Forum: Ruby Watir question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cc704ce316e72af824ccd38cfa53104b?d=identicon&s=25 Raja Gopalan (arc)
on 2014-06-11 09:02
hi,

please have a look at the code below

b.elements.each do |i|
  puts i.class
end


In the above coding "puts i.class" prints Watir::Element, but i would
like to know what element it is, like whether it's a text box, or select
box or check box. So Can I redefine the code in such a way that it would
tell me exactly what element it is?

Raj
14b5582046b4e7b24ab69b7886a35868?d=identicon&s=25 Joel Pearson (virtuoso)
on 2014-06-11 18:08
b.elements.each { |el| puts el.tag_name }
Cc704ce316e72af824ccd38cfa53104b?d=identicon&s=25 Raja Gopalan (arc)
on 2014-06-12 08:48
Joel Pearson wrote in post #1149516:
> b.elements.each { |el| puts el.tag_name }

Thank you.
This topic is locked and can not be replied to.