Watir testing: Get type [modified]
Web Development
1
Posts
1
Posters
0
Views
1
Watching
-
I am really hoping someone has good news on this because it will make my life way easier. i am writing a function in Watir for checking elements on a page to see if they are there. i am wondering if Watir has a way to "get type" on an element. So say I am passing "browser.image(:src,/happy.gif/)" to the def, is there a way to look at it and say "that is an img", or "that isnt a radio"? Edit: The answer is "yes" :D use .class, so "puts browser.image(:src,/happy.gif/).class" writes "Watir::Image" Good stuff :)
______________________ Oh Hamburgers!
modified on Friday, October 31, 2008 11:57 AM