Can I Wait Until certain property of element gets changed.

890 views
Skip to first unread message

Ajit Jadhav

unread,
Dec 19, 2014, 3:01:05 AM12/19/14
to robotframe...@googlegroups.com
Hi All,

I am about to wait until Button Property Gets "Enabled" .

But there is attribute of Button as "disabled" which is having value as disabled="disabled" by default and the same attribute gets removed from property tags after Button Enables.

Please Help ASAP if there is any default Keyword to do so.

:Objective is to observe Element Property Change. 

Thanks,
Ajit.

Tatu Aalto

unread,
Dec 19, 2014, 10:30:50 AM12/19/14
to Ajit Jadhav, robotframework-users

Ugh

You can example use the Page Should Contain Element[1] keyword and correctly set xpath selector to verify element(s) attribute(s). The w3schools xpath tutorial [2] gives good starting point to complex xpath selectors.

-Tatu
Send from my mobile
[1] http://rtomac.github.io/robotframework-selenium2library/doc/Selenium2Library.html#Page%20Should%20Contain%20Element
[2] http://www.w3schools.com/xpath/

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

Kevin O.

unread,
Dec 30, 2014, 9:43:17 AM12/30/14
to robotframe...@googlegroups.com
In XPath, you can use negation. Here's an example waiting for an input with name foo that does not have disabled as the value for the disabled attribute:
    Wait Until Page Contains Element    xpath=//input[@name='foo'][not(@disabled='disabled')]

I don't think I have done this, but it should work. I recommend experimenting using FirePath, if possible.

Kevin
Reply all
Reply to author
Forward
0 new messages