I asked on my previous post about what was wrong in instantiating driver on set up method?
And here is the solution video on my YouTube channel (After 5 years of gap I finally added new video tutorial :))
The solution described on video tutorial uses following set up -
public class BaseClassOnDemandDriverSetup {
private WebDriver driver;
@BeforeMethod
public void setupTest() {
// Any other set up goes here
}
@AfterMethod
public void teardown() {
if (driver != null) {
driver.quit();
}
}
public WebDriver getDriver() {
if(driver == null) {
WebDriverManager.chromedriver().setup();
driver = new ChromeDriver();
}
return driver;
}
}
Is Selenium IDE could install on latest firefox version
ReplyDeleteShould work, did you face any issue?
Delete