Page 1 of 1

Cannot see objects in iFrames of Edge Browser via webdriver

Posted: Fri Jul 28, 2017 7:20 pm
by Aracknid
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
Aracknid

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

Posted: Thu Aug 03, 2017 2:36 pm
by Support Team
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

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

Posted: Thu Oct 12, 2017 4:26 pm
by runitdown
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. :(

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

Posted: Fri Oct 13, 2017 2:03 pm
by Aracknid
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