tests: ensure password field is cleared before typing password

pull/246/head
Callan Bryant 2018-07-26 14:31:19 +01:00
parent a8dbf27faf
commit 68403fa681
1 changed files with 4 additions and 0 deletions

View File

@ -78,6 +78,10 @@ function CustomWorld() {
return that.driver.findElement(seleniumWebdriver.By.id("username")) return that.driver.findElement(seleniumWebdriver.By.id("username"))
.sendKeys(username); .sendKeys(username);
}) })
.then(function () {
return that.driver.findElement(seleniumWebdriver.By.id("password"))
.clear();
})
.then(function () { .then(function () {
return that.driver.findElement(seleniumWebdriver.By.id("password")) return that.driver.findElement(seleniumWebdriver.By.id("password"))
.sendKeys(password); .sendKeys(password);