I am using:
Ruby 1.8.6
Watir 1.6.2
IE 7.0
Firefox 3.0.10

I am trying to grab information from a link for further processing.  I
copy the link to a variable, mylink = obj.link(:index,1), and then use
mylink.html to get the html which I then parse for the text I am
interested in.

The 'html' method is returning different output depending on which
browser I use, IE or Firefox.  The output from each is below.  Firefox
just returns the text portion of the link, where IE returns the entire
html as expected.  The Firefox output is the same on Windows or Linux.

Am I missing something simple here?  Has anyone experienced similar
behavior?

Greg

-----Using IE (this is the behavior I expect)

irb(main):007:0> mylink.html
=> "<A onclick=\"switchBG(this,'deptContainer',false,0);getAisles
('12790');\" href=\"http:// ..... &departmentID=12790#\"
name=d0>Baby</A>"
irb(main):008:0> mylink.text
=> "Baby"
irb(main):009:0> mylink
=> #<Watir::Link:0xdd529f8 @how=:index, @container=....... #lots-o
output here
irb(main):010:0>

------Using Firefox (Windows or Linux)

irb(main):007:0> mylink.html
=> "Baby"
irb(main):008:0> mylink.text
=> "Baby"
irb(main):009:0> mylink
name:         d0
type:
id:
value:
disabled:
href:         #
inner text:   Baby
=>
irb(main):010:0>
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to