Tag: fluentwait

Selenium Webdriver 3.0.1:Selenium显示FluentWait类的错误

我正在使用Selenium Standalone Server 3.0.1 。 我试图向我的代码添加Explicit Wait以便在元素变得可见时通过xpath检测元素。 为了获得一些Java帮助,我查找了Selenium Standalone Server 3.0.1的源代码,但无法找到它。 我在selenium-java-2.53.1版本中找到了源代码。 我下载了它,找到了selenium-java-2.53.1-srcs并添加到我的Eclipse IDE 。 在FluentWait的帮助下,我只需复制粘贴Eclipse IDE的代码并更改变量名称。 文档中的示例代码如下: // Waiting 30 seconds for an element to be present on the page, checking // for its presence once every 5 seconds. Wait wait = new FluentWait(driver) .withTimeout(30, SECONDS) .pollingEvery(5, SECONDS) .ignoring(NoSuchElementException.class); WebElement foo = wait.until(new Function() […]