Okay, back to the original problem. I code similar to this:

if $browser.text_field(:id, "blah").exists?
   do something with text field
elsif $browser.select_list(:id, "blah").exists?
   do something with select list
   raise "blah not found"

this code is in a method and it will be called for two different
places - one, where this id is on text_field and another one where it
is with select_list - so, when I am on the page with select_list, then
$browser.text_field(:id, "blah").exists? returns true and the code "do
something with text field" fails with "(eval):3:in `invoke'(eval):3:in
`readonly?' --> unknown property or method `readOnly'". This is
because it is not text_field. What are the solutions for this case?
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to