WebDriver: Advanced Usage - not working...
I am trying to implement the advanced usage explicit and implicit waits. We currently use the standalone Selenium version. Whenever I setup the something like the following using the java junit test framework in Selenium standalone it causes an exception.
WebDriverWait wait = new WebDriverWait(driver, 10);<-----------------this first line causes an exception...
WebElement element = wait.until(ExpectedConditions.elementToBeClickable (By.id("someid")));
It basically fails on the new webdriver instance. Do I need to use WebDriver instead of the standalone Selenium in order to use these advanced features. If anyone has a working example I would greatly appreciate some help.
I'm not sure if this applies in Java, but in C# the webdriver wait is in the selenium support package.
You have the usage correct, but the wait number is in milliseconds instead of seconds. You'll need to multiply it by 1000
Last edited by dlai; 10-30-2015 at 08:17 AM.
what exception you are getting at that line.
Also could you make sure the driver object is not null at that line.
Tags for this Thread