Cannot see objects in iFrames of Edge Browser via webdriver

Ask general questions here.
User avatar
Aracknid
Posts: 342
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Cannot see objects in iFrames of Edge Browser via webdriver

Post by Aracknid » Fri Jul 28, 2017 7:20 pm

Hi,

I finally made enough progress to get my scripts (VS .NET and Ranorex API) to launch Edge and connect to the second spawned Edge window (although I had to add selenium code) and I'm getting some basic functionality to work, such as clicking on various DOM items. However, I have found that I cannot see objects within any iframe. Pretty much everything I need to work on is within iframes, so I cannot get to the meat of the tests. Am I doing something wrong?

Here in this image, you can see that using the endpoint to look at my locally run Edge window, I cannot see anything in the iframe. You can see the screen shot shows that there are plenty of form items to fill out...
cannot_See_objects_inside_iframes.png
cannot_See_objects_inside_iframes.png (96.23 KiB) Viewed 568 times
Aracknid

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Cannot see objects in iFrames of Edge Browser via webdriver

Post by Support Team » Thu Aug 03, 2017 2:36 pm

Hi All,

Just wanted to let everyone know that we are currently working with this user via email. Once we have some useful information to share, I will be sure to post it here as well!

Thanks!

-Jon
.
Image

runitdown
Posts: 1
Joined: Wed Feb 08, 2017 4:22 pm

Re: Cannot see objects in iFrames of Edge Browser via webdriver

Post by runitdown » Thu Oct 12, 2017 4:26 pm

Is there any more news on this issue?
I have the same problem as the web pages I want to test use iFrames for everything and currently the selenium WebDriver cannot see any of them. :(

User avatar
Aracknid
Posts: 342
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: Cannot see objects in iFrames of Edge Browser via webdriver

Post by Aracknid » Fri Oct 13, 2017 2:03 pm

Currently, all I know is that they are looking into it.

I was told this: By default, Selenium doesn't look for elements within iframes, and you have to switch to the iframe to look in it (like you have to switch to any DOM/window). This is built into Ranorex by default, meaning you can say start looking for an element off the root (top) of your DOM and it will look in all iframes recursively until it finds it.

I guess the logic built into translating your Ranorex script into a webdriver script just passes the root element to look off of and the xpath, and once the webdriver gets this info, it works the way it does, and that means it cannot see into the iframes. If you want it to work right now, you have to add Selenium code to switch to your iframe first and then continue looking. Depending on how you designed your script/framework, this might be fairly easy or it could be a nightmare (as in my case).

Also, someone has put this issue into the User Voice for us to vote on it. You should go vote on this if you are running into this problem.

https://uservoice.ranorex.com/forums/15 ... -webdriver

Aracknid