後にクラスを実行する方法を、私は別のクラスである他の試験後のクラスにあるテストを実行する必要があります。 私はTestNG-Java-Seleniumを使用していますが、dependsOnGroupsを使用しようとしましたが、動作させることができませんでした。 これは私の2つのクラスです: 最初にユーザーをブロックし、ログインが無効であることを確認します。他のJavaセレン
@BeforeClass
public void setUp() throws Exception {
this.setUpMaven();
}
@AfterClass // call function to close browser
public void teardown(){
this.quitBrowser();
}
@Test
public void loginAsInactive() throws Exception{
personas = new PersonasPage(driver);
login = new LoginPage(driver);
Reporter.log(" Probar que un usuario inactivo no se puede loguear");
// Go to the configuration
this.goToConfiguration();
this.goToMenu();
// Go to Manage people
personas.goToPersonas();
WebElement someElement = (new WebDriverWait(driver, 20)).until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(inputSearch)));
this.sendValue(inputSearch, "Inactive");
this.click(".tables tbody tr td:nth-child(7) a");
this.click(".basicdata label:nth-child(3) input ");
;
this.click(".container .addpeople .primary");
this.goToMenuUsuario();
this.logout();
login.loginToGo("[email protected]", "Auto1234");
Thread.sleep(2000);
Reporter.log(driver.findElement(By.cssSelector("p.reject")).getText());
もう一つは、同じ設定を持っていますが、ユーザーをアクティブにして、ログインを検証しています。 誰かにガイドラインを教えてもらえますか? ありがとう!あなたはTestNGのスイートとして実行できるかどう
をありがとうございましたかこれらの中にテストケースをグループ化し、それらを順番に実行することができます。 – namlik