On Thu, Dec 10, 2009 at 3:20 AM, Marlon marlonmoja...@gmail.com wrote:
How can I easy get button index?
counter = 1
browser.buttons.each do |button|
puts index:#{counter}
puts button.to_s
puts
counter += 1
end
Please let me know if you would like me to comment the code.
Željko
i think the each is done by including enumberable (
http://ruby-doc.org/core/classes/Enumerable.html) module ( it was way back
anyway), so any methods in the enumberable module should just work:
ie.buttons.each_with_index do |button, i|
puts index for bytton with id #{button.id} is #{ i + 1