O'Reilly logo

Selenium WebDriver Practical Guide by Satya Avasarala

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Waiting for WebElements to load

If you have a previous WebUI automation experience, I'm sure you would have come across a situation where your test script couldn't find an element on the webpage as the webpage is still loading. This could happen due to various reasons. One classic example is when the application server or webserver 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 webpage 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 your test scripts should wait for WebElements to load on the webpage.

WebDriver provides the test script ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required