Created
September 1, 2011 17:01
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
By loginError = By.id("topErrorMessages"); | |
boolean loginHasChanged = false; | |
try { | |
driver.findElement(loginError); | |
} catch (NoSuchElementException e){ | |
loginHasChanged = true; | |
} | |
if (loginHasChanged) { | |
// someone has changed the login | |
// check the info message about login change is there | |
assert.assertEquals(driver.findElement(By.id("login_change_msg").getText()),"The login details have change, use the new one"); | |
}else { | |
// normal case | |
// do something else | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment