Reputation: 29669
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?
Upvotes: 5
Views: 8505
Reputation: 11
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()).
Upvotes: 1
Reputation: 27486
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.
Upvotes: 7