mercredi 28 juin 2017

why before and after class not works in testng

this is the suite class
public class suiteclass {
WebDriver driver;
@BeforeClass
public void beforeSuite() {
System.setProperty("webdriver.gecko.driver", "E:/Software Testing/Selenium/Programs/geckodriver.exe");
driver = new FirefoxDriver();
driver.get("http://52.211.167.71");
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
} @AfterClass
public void aftersuite()
{ driver.close();
}
}

public class loginclass extends suiteclass{
@Test
public void loginpage() {
loginpage login = new loginpage(driver);
login.presslogin();
login.sendkeys(" "," ");
login.loginbutton();
login.seetingpage();
}
}

login page not read the before and after in suiteclass

Aucun commentaire:

Enregistrer un commentaire