【发布时间】:2017-01-12 19:58:00
【问题描述】:
我正在尝试自动化无法识别静态下拉列表的网页。
<select name = "homeURL" tabIndex = "4" class = "storeId" >..</select>
我尝试使用下面提到的代码使用 Select 类来识别它
Select dropdown = new Select(driver.findElement(By.name("homeURL")));
dropdown.selectByIndex(2);
我收到以下错误:
Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to find element with name == homeURL (WARNING: The server did not provide any stacktrace information)
【问题讨论】:
标签: selenium selenium-webdriver