【发布时间】:2019-09-10 11:29:08
【问题描述】:
String baseUrl = "http://demo.guru99.com/test/login.html";
driver.get(baseUrl);
// Get the WebElement corresponding to the Email Address(TextField)
WebElement email = driver.findElement(By.id("email"));
// Get the WebElement corresponding to the Password Field
WebElement password = driver.findElement(By.name("passwd"));
【问题讨论】:
-
错误指向 WebElement 行
-
错误是什么?发布完整的堆栈跟踪。
-
@saikiranthotakura 检查 id
email或名称passwd的元素是否实际存在/可见 -
@bhusak 是的,有 id email 和 name passwd 的元素
-
@Guy 错误指向 WebElement 行和 id
标签: java selenium selenium-webdriver webdriver webdriverwait