I have 2 classes - Class A and Class B - class A containing 2 test methods and Class B containing 1 test method annotated with @Test and priority in TestNG
Class B extends Class A as class B need to use WebDriver object initialized in Class A (in one of the methods annotated with @Test (priority=1))
When TestNG run the tests, it runs both methods of Class A and then runs the method in Class B. And then it runs the 2 methods of Class A again and completes the test
Why does it execute methods of Class A again? How to prevent it from doing this?