0
我无法在页面加载时从下拉列表中选择值。如何使用硒web驱动程序控制“Ajax”?
我使用这个代码隐超时选项:
driver.manage.timeout(100,timeunit.Millisecond);
driver.findelement(By.id("valueID")).click();
我无法在页面加载时从下拉列表中选择值。如何使用硒web驱动程序控制“Ajax”?
我使用这个代码隐超时选项:
driver.manage.timeout(100,timeunit.Millisecond);
driver.findelement(By.id("valueID")).click();
presenceOfElementLocated并不保证元素是可点击的,甚至可见。从DOC:
An expectation for checking that an element is present on the DOM of a page.
感谢回答大家:
我发现在这种情况下的解决方案:
**
WebElement web = driver.findElement(By.id(ID));
Select clickonthis = new Select(web);
clickonthis.selectByVisibleText("Bombay")
**