Selenium has some nice support for finding elements in a page via xpath
selenium.isElementPresent("//textarea")
and in ajax pages you can use waitForCondition to wait on a page until something appears
selenium.waitForCondition("some_javascript_boolean_test_as_a_string", "5000")
My difficulty is, I can't seem to get into a position to use the xpath support for the boolean test. document.getElementById seems to work fine, but selenium.isElementPresent doesn't.
Is there any easy way of accessing selenium's xpath element finding abilities from within waitForCondition's first parameter?
An more straightforward way to do it is:
selenium.waitForCondition("selenium.isElementPresent(\"xpath=//*[@id='element_id_here']/ul\");", time_out_here);
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