获取“UT010019:响应已提交”错误“

时间:2016-05-24 12:21:20

标签: selenium-webdriver

plz纠正我:

driver.navigate().to(appURL);
System.out.println("Testing Login Page");
WebDriverWait wait = new WebDriverWait(driver, 60);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.linkText("Log In")));
WebElement logIN = driver.findElement(By.linkText("Log In"));
logIN.click();
WebElement username = driver.findElement(By.name("name"));
username.clear();
username.sendKeys("admin@cg.com");

WebElement password = driver.findElement(By.name("password"));
password.clear();
password.sendKeys("1234");

WebElement submitBtn = driver.findElement(By.id("login"));
submitBtn.click();

WebDriverWait wait1 = new WebDriverWait(driver, 60);
wait1.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("/html/body/div[6]/div/div[2]/div/div[2]/div/ul/li[1]/div/div[1]/img")));
driver.findElement(By.xpath("/html/body/div[6]/div/div[2]/div/div[2]/div/ul/li[1]/div/div[1]/img")).click();
driver.navigate().back();

0 个答案:

没有答案