Skip to content

Commit

Permalink
changes in login testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
Yashavant1629 committed Jan 3, 2024
1 parent 676c5da commit 8cad9a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/java/testcase/LoginPageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ public class LoginPageTest extends DriverCreator {
public static void resetPassword(String email,String scenario) throws InterruptedException {
commons.click(driver, By.linkText(locators.getProperty("reset_link")));
commons.enter(driver,By.xpath(locators.getProperty("reset_email_field")),email);
commons.click(driver,By.path(locators.getProperty("confirm_email_button")));
commons.click(driver,By.xpath(locators.getProperty("confirm_email_button")));
if (scenario.equals("TRUE")) {
String successMessage = driver.findElement(By.cssSelector(locators.getProperty("confirmation_message"))).getText();
Assert.assertEquals(successMessage,"An email has been sent with credentials to reset your password");
}
else {
String errorMessage = driver.findElement(By.cssSelector(locators.getProperty("reset_password_error_message"))).getText();
Assert.assertEquals(errorMessage, "Incorrect email. Please enter the registered email address.");
Assert.assertEquals(errorMessage, "Incorrect email1. Please enter the registered email address.");

}
}
Expand Down

0 comments on commit 8cad9a5

Please sign in to comment.