RE: Second Test fails on TestNG test suite
Just curious to know that anybody else has faced the issue with TestNG xml, that the first test runs perfectly fine but second test of the test suite fails. Running test using testng xml
The issue is that the testng is trying to run the second test on the driver which was opened in the first test case. Even though the first driver was opened and closed in the first test case itself and a new driver instance is opened in the second, still it is ignoring the second driver.
Root cause is Testng xml passing the first driver to second test case internally.
<suite name="First Suite" > <test name="InjuryBenfCal" > <classes> <class name="testCases.InjuryBenfCal_001" /> <class name="testCases.InjuryBenfCal_002" /> </classes> </test> </suite>