What is Selenium WebDriver's default implicit wait value?
The selenium documentation says that it is "0" but when I call .findElement on a brand new project, where a element doesn't exist on the DOM, it seems to get a TimeoutException after a while rather than hang indefinitely. Does "0" mean wait forever or not?
The default value for implicit waits is indeed zero, which means (and always has meant) "fail findElement
immediately if the element can't be found." You shouldn't be receiving a TimeoutException
directly from findElement
. You'll likely only be receiving that when using a so-called "explicit wait", using the WebDriverWait
construct.
I believe, in SeleniumBasic at least, the implicit wait is 3000ms, or 3 seconds. You can find out for yourself by simply using msgbox(driver.timeouts.implicitwait()).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With