Waiting for WebElements to load

If you have a previous UI automation experience, I'm sure you would have come across a situation where your test script couldn't find an element on the web page because the web page was still loading. This could happen due to various reasons. One classic example is when the application server or web server is serving the page too slowly due to resource constraints; the other could be when you are accessing the page on a very slow network. The reason could be that the element on the web page is not loaded by the time your test script tries to find it. This is where you have to calculate and configure the average wait time for your test scripts to wait for WebElements to load on the web page.

WebDriver provides ...

Get Selenium WebDriver 3 Practical Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.