I have 5 tests 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 loop 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.