I m using A.java for initializing the driver to use for test classes.I have used @BeforeCLass
public class A{
static WebDriver driver;
@BeforeClass
public void returnDriver(){
driver = //I used other method to initiate and return the driver to here
}
}
Extending Above class to Test classes
public class A1 extends A{
public A1(){
returnDriver();
}
@Test
public void a(){
}
@Test
public void b(){
}
public class B1 extends A{
public B1(){
returnDriver();
}
@Test
public void a1(){
}
@Test
public void b1(){
}
When I execute the code, by default multiple browser instances starts running