Selenium

How to wait until AJAX call completes in Selenium tests

If you introduce AJAX to the application that is web tested with Selenium your tests might fail from time to time. In my case the tests were failing randomly, not that often but it made their quality decreased. So, how can you fix this?

Solution

Ideally, what you need is to stop the test execution (e.g. do not perform checks …