[wtr-general] Re: Problem getting attribute of a span
ie.spans.each do |span| if span.className=="SSSBUTTON_CONFIRMLINK" puts span.text end end something like that? use the cheat sheet: http://wiki.openqa.org/display/WTR/Cheat+Sheet On Sat, Nov 7, 2009 at 05:49, BookGuy wrote: > > I'm trying to test against the class name of a span. I'm iterating > through all spans and basically want to say, "If ie.spans[x]'s value > for > class = "SSSBUTTON_CONFIRMLINK" then return the inner text of the > span" > > print ie.spans[x] returns the following > > type: > id: > name: > value: > disabled: false > class:SSSBUTTON_CONFIRMLINK > text: Start a New Search > > Anyone know how to accomplish this? I haven't been able to figure out > the command to return the class name of a span. I know ie.spans > [x].text > will return the inner text but I don't know the code for any of the > other attributes. i tried using :class also to no avail. > > Thanks for any help, > Mike > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Problem getting attribute of a span
Hello, If nothing works out then please use the hpricot library, excellent library for screen scrapping. Karim Rayani On Sat, Nov 7, 2009 at 2:49 AM, BookGuy wrote: > > I'm trying to test against the class name of a span. I'm iterating > through all spans and basically want to say, "If ie.spans[x]'s value > for > class = "SSSBUTTON_CONFIRMLINK" then return the inner text of the > span" > > print ie.spans[x] returns the following > > type: > id: > name: > value: > disabled: false > class:SSSBUTTON_CONFIRMLINK > text: Start a New Search > > Anyone know how to accomplish this? I haven't been able to figure out > the command to return the class name of a span. I know ie.spans > [x].text > will return the inner text but I don't know the code for any of the > other attributes. i tried using :class also to no avail. > > Thanks for any help, > Mike > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---