Forum: Ruby Watir question

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
41ffd3f2fee19dbac758664759b0cdfc?d=identicon&s=25 Raja G. (arc)
on 2014-06-11 09:02

please have a look at the code below

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

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?

9627ec27e4fb3a18be02133b4ddaa901?d=identicon&s=25 Joel P. (virtuoso)
on 2014-06-11 18:08
b.elements.each { |el| puts el.tag_name }
41ffd3f2fee19dbac758664759b0cdfc?d=identicon&s=25 Raja G. (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.