Selenesse equivalent of switchTo().defaultContent() to get out of iframe?

135 views
Skip to first unread message

Karen Tobo

unread,
Jul 16, 2012, 12:15:56 PM7/16/12
to selenes...@googlegroups.com
Hi folks!

I'm looking for the equivalent of switchTo().defaultContent() to get my Selenesse test case out of an iframe and back to the top-level content of a page.
I haven't succeeded with any of these, so I'm sure I'm way off track.
| select frame | _Top, _Parent, default, null |

As always, I really appreciate the help I get here.
 - Karen Tobo

Here's the basic flow of the test:

|<open / and log in> |
|mouseOver | id=oCMenu_myMenu |
|clickAndWait | id=oCMenu_acquireWidgets |
|mouseOut | id=oCMenu_myMenu |

| select frame | main_frame |
| <do testing stuff> |
| <get out of main_frame> |
| <select another menu> |
| <do more testing> |

---
And here's the skeleton of the page under test:

<html><head>

      <title> My Title </title>

                   <base href="http://myapp.mydomain.com/myapp/jsp/layouts/mainwindow.jsp">

                   <link rel="stylesheet" type="text/css" href="/myapp/css/coolmenu.css">

                   <link rel="stylesheet" type="text/css" href="/myapp/css/MYAPP.css">

       <script type="text/javascript" src="/myapp/scripts/coolmenus4.js"></script>

                   <script type="text/javascript" src="/myapp/scripts/cm_addins.js"></script>

   </head>

   <body scroll="no" bottommargin="0" rightmargin="0" topmargin="0" leftmargin="0">

                <script type="text/javascript" src="/myapp/scripts/coolmenu4-config.js"></script>

               

<script type="text/javascript">

<!--

       

    oCMenu.makeMenu('firstMenu','','Widgets Menu','','main_frame','120','','','','','','','',0,'','','');

        oCMenu.makeMenu('acquireWidgets','firstMenu','Acquire Widgets','/myapp/mainMenu.do?operationType=3','main_frame','140','','','','','','','',0,'','','');

<!-- make more menus -->

oCMenu.construct();

</script>

<div class="clBar" id="oCMenubbar" style="z-index: 1; clip: rect(0px 1264px 24px 0px); width: 1264px; height: 24px; left: 0px; top: 0px; visibility: visible; "><div class="clBar" id="oCMenubbar_0" style="clip: rect(0px 1264px 24px 0px); width: 1264px; height: 24px; left: 0px; top: 0px; visibility: visible; "></div></div>

<!-- draw more menus --> 

<iframe src="/myapp/jsp/layouts/welcome.jsp" name="main_frame" frameborder="no" height="100%" width="100%">

   &lt;/body&gt;

&lt;/html

</iframe>

</body></html>

Reply all
Reply to author
Forward
0 new messages