WebDriver doesn't give direct access to the underlying DOM object like other
implementations. Instead you can use b.text_field(:id,
"text_field").style("color").

Den 8. aug. 2011 kl. 20:34 skrev hillary <weimar1...@gmail.com>:

When there's an error, the application i'm testing changes the color of the
element, a text_field, changes to red. Currently I validate that the
text_field is red like this:
b.text_field(:id, "text_field").document.currentstyle.color.should ==
'#444'

I also will did to validate the color of a div message that tells the user
that changes have been saved. i use the document.currentstyle.color for this
also.

Thanks.

-- 
Before posting, please read http://watir.com/support. In short: search
before you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to