Selenium Webdriver provides an implicit wait to synchronize the test. When an implicit wait is used to execute the test, if the Webdriver does not find the element in the DOM, it will continue to wait, after the set time is exceeded, the element exception is not found
That is, when the element does not appear immediately, the implicit wait waits for a period of time before looking for the DOM. The default time is 0.
Once an implicit wait is set, it will exist throughout the lifetime of the Webdriver object instance , and the implicit wait will slow down the test for a normal response application, waiting for each element to be searched, increasing the time of the entire test execution.
You should avoid or reduce the use of an implicit wait
Wait 60s
Driver.manage (). Timeouts (). implicitlywait (Timeunit.seconds);
Note:
Webdriver.timeouts implicitlywait (long time, java.util.concurrent.TimeUnit unit)
Specifies the wait time for driver when the found element does not appear immediately
When looking for an element, driver should poll the page until the element is found or exceeds the set time-out (before throwing a nosuchelementexception exception)
When looking for a set of elements, driver should poll the page until at least one element is found or the time-out is exceeded.
Increasing the implicit wait timeout should be used with caution because it adversely affects the execution time of the test, especially when using a slower positioning strategy such as XPath.
Parameters:
Value of time--wait time
Unit of measurement for unit--wait time
[Selenium webdriver Java] Implicit wait-and-sync