Menu

retreiving nested htmls in frames

2001-08-01
2004-02-27
  • Vimalasekar Rajendran

    Hi folks,
      i am writing a stanalone application using httpunit to test a web page which has many frames in it. how do i get the WebRequest of the nested htmls pointed by the frames. as i am getting the mainframeset html only. any suggestions.

    Regards,
    vimal

     
    • Felix Schmid

      Felix Schmid - 2001-08-02

      try this:

      resp = wc.getResponse( url );

      // get the frame you want by its name
      resp = wc.getFrameContents( "FRAME_NAME_HERE" );

       
      • Jacqueline Guerrero

        I need some help.  I need to get to a frame within a sub-frameset: "tree" frame below.  The dump below is the response.getText() output.  When I do getFrameNames() on this page, nothing is returned.  I also did a test to see if I can retrieve the title, and it also not returning the title.   I'm not sure if the response is really referring to the page, which might be the reason why I am not seeing the frames either.  Anyone have any ideas????

        <html:errors/>
        <html>
        <head>
          <title>Purisma Customer Registry</title>
        </head>
            <frameset rows="41,*,29" marginwidth="0" marginheight="0" framespacing="0">
                <frame src="toolbar.jsp"     name="toolbar" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
                <frameset cols="20%,*" marginwidth="0" marginheight="0" framespacing="2">
                    <frame src="tree.jsp" name="tree" marginwidth="0" marginheight="0" scrolling="yes" frameborder="1">   
                    <frame src="content.jsp" name="content" marginwidth="0" marginheight="0" scrolling="yes" frameborder="1">   
                </frameset>
                <frame src="statusbar.jsp"     name="statusbar" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
            </frameset>
        </html>

         

Log in to post a comment.

Auth0 Logo