I am new to and trying to Develop Data Driven framework using CSVReader

I have 5 in Testng and have to run those all on different environments. So basically I have to pick a different url and client, but other pages, elements remain same.

My Question is, Where do I put while so that it reads first line and execute all the tests and then read second line and so on.

I tried initialize CSV reader at class level, before suite, before method etc. but it throws error, it works for a particular test if I am putting insside @Test but that doesn’t resolve the purpose, I couldn’t find any relevant answer on the internet.


Source link https://sqa.stackexchange.com/questions/34979/selenium-webdriver-testng--using-while-loop-for-all-tests


Please enter your comment!
Please enter your name here