sagarpabba / selenium-vba

Automatically exported from code.google.com/p/selenium-vba
0 stars 0 forks source link

how to switch back to default content once used switchtoframe code #57

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Operating system :windows 7
.Net Framework version :
Office Version :2010
SeleniumWrapper version :1.17

What is your issue ?
I have used 
driver.switchtoframe ("frame1").findfieldbyid ("field1").sendkeys "text"

This worked fine. But when I wrote next line to click on a button in main page 
not part of frame. It is not working.
driver.findfieldbyid ("button1").click

But if button is part of frame1 it works fine perfectly. I found there is 
switchto ().defaultcontent () in selenium but can't find a way to do it in 
selenium-vba wrapper. When using in vba webdriver

Original issue reported on code.google.com by JOBIN.LO...@gmail.com on 1 Mar 2014 at 5:44

GoogleCodeExporter commented 9 years ago
Selenium 2 command is not implemented yet, but you can still use the Selenium 1 
command:
driver.selectFrame "relative=top"

The driver.switchToDefaultContent() will be available in the next release.

Original comment by florentbr on 1 Mar 2014 at 5:14

GoogleCodeExporter commented 9 years ago
Thanks will try the older one out

Original comment by JOBIN.LO...@gmail.com on 1 Mar 2014 at 5:56

GoogleCodeExporter commented 9 years ago
Operating system: Windows 7
. Net Framework version 4.0
Office Version: 2010
SeleniumWrapper version: 1:19

If an html page have a "iframe" with no name. How can I use the command 
"driver.switchtoframe (?)".
I tried with "driver.switchtoframe (0)" but it does not work.
Thank you.

Example:
<iframe frameborder="0" src='/Webxx/site/siteList.jsp' scrolling="auto"> </ 
iframe>

Original comment by cbjunkma...@gmail.com on 27 Jun 2014 at 5:07

Attachments:

GoogleCodeExporter commented 9 years ago
Your Info_Frame_No_Name.html contains critical errors (2 header/body).
Make sure your html is properly constructed (http://validator.w3.org/check) and 
try again, it should then works.

Original comment by florentbr on 27 Jun 2014 at 6:39

GoogleCodeExporter commented 9 years ago

Original comment by florentbr on 8 Sep 2014 at 5:40