We started using Selenium and one thing that would be desirable is if for each AJAX call, we could have a generic wait condition i.e. we don't want to wait for a particular element to show up. That's not even going to work in all cases. If you're using an af:iterator or af:forEach, you would want to wait till the last element is done and you won't know what that is unless you hard code that particular ID. Anyway, it's just bad to do something like that and not always feasible.
I found one way that's supposed to work. I haven't seen anyone mention it not working.
selenium.waitForCondition("selenium.browserbot.getCurrentWindow().Ajax.activeRequestCount == 0", "10000");
Here's the blog where I found it.
http://blog.vishnuiyengar.com/2009/08/testing-ajax-applications-with-selenium.html
However I get this error:
>
com.thoughtworks.selenium.SeleniumException: selenium.browserbot.getCurrentWindow().Ajax is undefined
>
I don't know what's supposed to create the Ajax object. I take it that ADF doesn't. Does anyone know of an equivalent way to tell that there are no active Ajax calls being processed?