Link to home
Start Free TrialLog in
Avatar of renisenbe
renisenbe

asked on

How to know if a page with Ajax has fully loaded, using Javascript?

I am using Selenium RC with Java to automate pages which have ajax elements and i want to calculate the time it takes for the page to fully load.
I've tried         selenium.waitForCondition("selenium.browserbot.getCurrentWindow().Ajax.activeRequestCount == 0;", DEFAULT_WAIT_PERIOD);
but it returns as undefined. It doesn't help that i don't know the Javascript library that my page is using. The above line works for Prototype. I've tried the equivalent for JQuery and Dojo, but no luck.
Is there a way for me to track how many XMLHttpRequests went out and how many came back?
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the points!