RE: Implement global variable for Testcase number to execute from excel.

I am using Selenium webdriver with Testng for automation with data driven module where i am reading the testcases data from excel. I have hard coded the row numbers for each test case . If i want to add any cases in the middle again i have to change the numbering of all the cases. So how can i solve this issue.

mallik9292 Train Asked on October 28, 2014 in Selenium WebDriver.
Add Comment
5 Answers

Hi Mallik,

I think i mis read your question.

I hope you are looking for a dynamic way to associate your test cases with right test data in the Excel sheet. I request you to go through the following links in sequential order:

Constant Variables : http://www.toolsqa.com/selenium-webdriver/constant-variables/Data Driven Technique : http://www.toolsqa.com/selenium-webdriver/data-driven-testing-excel-poi/
User Functions : http://www.toolsqa.com/selenium-webdriver/user-defined-functions/

In the last link I have told how to pick up the testcase name from excel to get the test data of the current test cases dynamically.

Regards,
Lakshay Sharma

Professor Answered on October 28, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.