【发布时间】:2016-01-02 04:30:25
【问题描述】:
创建驱动程序时,我已将隐式等待时间设置为 10 秒。当我希望使用显式等待时,是否必须将隐式等待设置为 0?
这是一个示例:
WebDriver webDriver = new FirefoxDriver();
webDriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
//Now I want to use Explicit wait
我必须做 webDriver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS);还是没有必要?
WebDriverWait wait = new WebDriverWait(webDriver, WAIT_FOR_TIMEOUT_SEC);
WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(id)));
【问题讨论】:
-
这个问题在当前状态下看起来不错。
标签: java c# selenium selenium-webdriver automation