>Luckily, Selenium has a feature that is horribly documented: waitForValue, >which you can use in the test case directly, and waitForCondition, >callable in a JavaScript-based extension. Using a combination of these, >you can make your Ajax call and wait for any condition that should happen, >such as the DOM changing or values updating.