From Pojo.us
Selenium
Problems with waitForCondition when running tests from within the Selenium IDE:
Given a selenese in a test script that looks like this:
| waitForCondition | (selenium.browserbot.getCurrentWindow().document.getElementById('ranking_forums_12345').ranking != undefined) && (selenium.browserbot.getCurrentWindow().document.getElementById('ranking_forums_12345').ranking.avgRanking != undefined) | 2000 |
In Firefox, instead of getting the actual object that you are expecting back (in this case an HTMLSpanElement with a custom field added to the DOM object), it will return this:
[object XPCNativeWrapper [object HTMLSpanElement]]
This is because the Selenium IDE script is not trusted by Firefox, and so Firefox is wrapping the object to protect the other scripts. To get around this, you need to run your test with the Selenium TestRunner or from Selenium-RC.
