@Then("^I use those accounts to login successfully and unsuccessfully$")
public void loginWithDifferentUserAccounts() {
for (String [] userAccount : userAccounts) {
jwalaUi.loadPath("/login");
jwalaUi.sendKeys(By.id("userName"), userAccount[0]);
jwalaUi.sendKeys(By.id("password"), userAccount[1]);
jwalaUi.click(By.cssSelector("input[type=\"button\"]"));
if (userAccount[2].equalsIgnoreCase("mainPage")) {
jwalaUi.waitUntilElementIsVisible(By.className("banner-logout"));
} else if (userAccount[2].equalsIgnoreCase("loginErrorMessage")) {
jwalaUi.waitUntilElementIsVisible(By.className("login-error-msg"));
} else {
fail("Unexpected result = " + userAccount[2]);
}
}
}
BatchLoginRunSteps.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:jwala
作者:
评论列表
文章目录