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 ...

Get Selenium WebDriver Practical Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.