How do I wait for a JavaScript __doPostBack call through Selenium and WebDriver

I have found, the easiest way to deal with these JS postbacks, is to wait for the element that is affected by the load to go stale or not be found. Here is an example function: def waitForElementRemoved(Element, WaitCount, WaitTime): ElementRemoved = False WaitTry = 0 while not ElementRemoved: try: if WaitTry > WaitCount: raise … Read more