Unfortunately, I cannot change html. Also, this is a real bug. I've submitted it here: to http://jira.openqa.org/browse/WTR-326
On Oct 8, 11:25 pm, orde <ohil...@gmail.com> wrote: > Weird. Looks like it's returning the text (i.e. "1st button") instead > of the value ("first button"). > > I'm not sure why you are getting unexpected results, but here are a > couple of things that might help: > > * <button> tag isn't the same as <input type="button"> tag > * your code below should work if all the buttons are <input > type="button">, like this: > > <input type="button" id="1" value="1 button"> > <input type="button" id="2" value="2 button"> > <input type="button" id="3" value="3 button"> > > Hope that helps. > > orde > > On Oct 7, 6:11 am, kat <katfor...@gmail.com> wrote: > > > Watir:Buttons is supposed to return all buttons on a page. > > With the next tested page > > > <html> > > <title>some title</title> > > <body> > > <br> > > <button id="1" value="first button">1st button</button> > > some text > > <button id="2" value="second button">2nd button</button> > > <input type="button" id="6" value="6th button"> > > </body> > > </html> > > > using this script: > > > require 'watir' > > test_site = 'http://localhost/test.html' > > ie = Watir::IE.new > > ie.goto(test_site) > > ie.buttons.each do |a_button| > > puts a_button.value > > end > > > I get only "1st button" in output. > > Do I do something wrong or this is a bug? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---