This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
@UseDataProvider("testForDataFailure") | |
public void testLoginFailure(String username, String password, String expected, String testName, string locatorId) { | |
//try loggin in with username and password | |
login(username,password); | |
//get the text from the alert element | |
String actual = driver.findElement(By.id("alert")).getText(); | |
assertEquals(testName, expected, actual); | |
} | |
@Test | |
@UseDataProvider("testForDataSuccess") | |
public void testLoginSuccess(String username, String password, String expected, String testName, string locatorId) { | |
//try loggin in with username and password | |
login(username,password); | |
//get the text from the alert element | |
String actual = driver.findElement(By.id("logged-user-name")).getText(); | |
assertEquals(testName, expected, actual); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment