//@Test(priority=8)
public void reset_psw()
{
LoginPage login=new LoginPage(driver);
driver.findElement(By.xpath("//*[@id='app']/div/div[2]/a")).click();
WebDriverWait wait = new WebDriverWait(driver, 10);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id='app']/div/div[2]/form/div[3]/div[2]/button[contains(text(),'Send Password Reset Link')]")));
String expectedTitle = "Placer Admin - Password recovery";
String actualTitle = driver.getTitle();
login.equal_titles(actualTitle, expectedTitle);
driver.navigate().refresh();
}
@Test(priority=9)
public void reset_email()
{
LoginPage login=new LoginPage(driver);
driver.findElement(By.xpath("//*[@id='app']/div/div[2]/a")).click();
WebDriverWait wait = new WebDriverWait(driver, 60);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id='app']/div/div[2]/form/div[3]/div[2]/button[contains(text(),'Send Password Reset Link')]")));
/*login.set_reset_email("");
login.click_reset_button();
WebDriverWait wait_reset_psw = new WebDriverWait(driver, 10);
wait_reset_psw.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id='app']/div/div[2]/form/div[2]/span[2]")));
Assert.assertEquals(driver.findElement(By.xpath("//*[@id='app']/div/div[2]/form/div[2]/span[2]")).getText(),"The email field is required.");*/
driver.navigate().refresh();
}
@AfterTest
public void close()
{
driver.close();
}
This is part of my code.When I run these two separately,It is running without any error.But when I try to run these two at once with priority it is showing error as follows,
PASSED: reset_psw
FAILED: reset_email
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by By.xpath: //*[@id='app']/div/div[2]/form/div[3]/div[2]/button[contains(text(),'Send Password Reset Link')] (tried for 60 second(s) with 500 MILLISECONDS interval)
Login page showing 60 secs without making click on link which I want.
How to solve this error? Please help me to find this problem...