I'm writing a selenium script that should only start testing after all ajax calls have completed.
Several forums have suggested that I use the following condition (in the waitForCondition command):
selenium.browserbot.getCurrentWindow().jQuery.active == 0
Unfortunately this keeps throwing an error:
jQuery is undefined
JQuery is definitely defined on my site. I have also tried substituting the jQuery with $, but get the same error.
Any ideas?
You might need to wait for jQuery to have finished loading, try waiting until
typeof selenium.browserbot.getCurrentWindow().jQuery == 'function'
is true, before checking active.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With