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
else
   raise "blah not found"
end

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: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to