Global implicit waiting for WebDriver
In fact, WebDriver also provides a global implicit wait function, the code is as follows:
WebDriver.manage (). Timeouts (). ImplicitlyWait (20)
What does this sentence mean? it actually allows webDriver to have a global implicit wait function, translated into vernacular, that is, Hi, webDriver, when you want to find a WebElement element, but this element does not appear immediately, please wait, because the Dom has time to load, you can wait up to 20 seconds and then execute again, if the element does not appear after 20 seconds. Then mark the test case you are currently executing as Fail.
This setting is valid for the entire life cycle of webDriver.