[RndTbl] trouble with Firewatir

Sean Walberg sean at ertw.com
Tue Apr 20 11:34:00 CDT 2010


Looking at the rdocs, http://wtr.rubyforge.org/rdoc/1.6.5/, have you tried

browser.frame("main").html

?

On Tue, Apr 20, 2010 at 10:51 AM, Dan Martin <ummar143 at shaw.ca> wrote:

> I am learning to navigate and scrape.  I have had more success with
> Firewatir than Ruby mechanize, but both are poorly documented.
>
> Current problem:  logging into a site webpage, Firwatir can see the
> frames, but cannot access them.
>
>  >> browser.show_frames
> There are 3 frames
> frame: name: topbar
>       index: 1
> frame: name: langFrame
>       index: 2
> frame: name: main
>       index: 3
> => 0..2
>
>  >> browser.frame(:index, 1)
> => #<FireWatir::Frame:0x1a9260c located=false how=:index what=1>
>
>  >> browser.frame("main")
> => #<FireWatir::Frame:0x1a90dd4 located=false how=:name what="main">
>
> Firefox shows the webpage source [I show only the top levels]
> structure as:
>
> <html>
>
> <head>
>        <meta http-equiv="content-type"
> content="text/html;charset=iso-8859-1">
>        <title>TITLE</title>
>        <link rel="stylesheet" href="all.css">
>
>        <script language="JavaScript" src="WEBPAGE"></script>
>        <script language="JavaScript">FUNCTIONS</script>
> </head>
>
>        <frameset rows="63,0,*" border="0" id="frameset_ID" framespacing="0"
> frameborder="no" onload="loadHomepage(1);" onunload="forceLogout();">
>                <frame src="/TDM/header.htm" name="topbar" scrolling="no"
> noresize>STUFF IN HERE</frame>
>
>                <frame name="langFrame" src="lang.html">STUFF IN
> HERE</frame>
>                <frame src="" id="main_ID" name="main" noresize>STUFF IN
> HERE THAT I
> WANT</frame>
>        </frameset>
>
>        <noframes>
>                STUFF IN HERE
>        </noframes>
>
> </html>
>
>
> I cannot access any forms etc included in the frame unless I can
> name / access the frame.
> Any ideas?
>
> Dan Martin
> GP Hospital Practitioner
> Computer Scientist
> ummar143 at shaw.ca
> (204) 831-1746
> answering machine always on
>
> _______________________________________________
> Roundtable mailing list
> Roundtable at muug.mb.ca
> http://www.muug.mb.ca/mailman/listinfo/roundtable
>



-- 
Sean Walberg <sean at ertw.com>    http://ertw.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.muug.mb.ca/pipermail/roundtable/attachments/20100420/8b37950c/attachment.html 


More information about the Roundtable mailing list