Implicit Versus Explicit Waits

Now that we have learned what implicit and explicit waits are, let's review how they compare to each other:

Some of the items in the preceding table allow us to determine that explicit waits are, most of the time, the better choice for our test.

On one hand, the capacities of implicit waits are limited due to the fact that they only work when using methods to find objects in the DOM. Explicit waits are more flexible and versatile because they allow for the setting of many test scenarios based on a range of possible pre-conditions.

On the other hand, implicit waits are global timeouts for the entire automation script. Hence, every time the script encounters a findElement command, it will poll until the element is found. But if the element is not found, the script will keep waiting until the timeout. These conditions will affect the performance and increase the execution time of the script.

We are now able to understand the differences between implicit and explicit waits.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.204.140