FireWatir: get the text from a frame

M

Mario Ruiz

I'm trying to get the text shown in a frame using the text porperty in
firewatir that works for a no-frame window but it doesn't work for a
frame....

A full example using watir and firewatir:

require 'firewatir'
require 'watir'
ie=Watir::IE.new()
ff=FireWatir::Firefox.new()
url="http://www.tlwilliams.net/NOCCC/0005/0005pFrame.html"
frame="menu"

ff.goto(url)
ie.goto(url)

puts "************************ FIREFOX *************************"
myframe=ff.frame(frame)
puts myframe.text()

puts "************************ INTERNET EXPLORER
*************************"
myframe=ie.frame(frame)
puts myframe.text()

ff.close()
ie.close()


The result is:

Starting Firefox using the executable : C:\Program Files\Mozilla
Firefox\firefox.exe
Waiting for 2 seconds for Firefox to get started.
************************ FIREFOX *************************

************************ INTERNET EXPLORER *************************
Web Publishing - Using Frames in HTMLFrames

__5.0_Introduction_to_Frames

__5.1_Using_Frames

__5.2_Complex_Frames

__5.3_Floating_Frames

__5.4_References


As you can see we don't have any text content from firewatir.

Anybody knows how to get the text.. I mean not the html

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top