web elements not recognized in iFrame

Mobile Testing, Android App Testing.
Posts: 2
Joined: Fri Apr 24, 2015 1:10 pm

web elements not recognized in iFrame

Post by TimRo » Fri Apr 24, 2015 2:32 pm


I've been using Ranorex for webtesting, Up to now only desktop browsers.

Now I want to try the mobile part, so I recorded a small test (user login).
When I run the test, it will have no problem finding the login button on the website,
but the problem is: after the click, a pop up(iFrame) will open, with some text boxes like username, password, ...
And these objects won't be recognized.

Any ideas or tips I can try when testing iFrames?

I'm using genymotion as emulator.

I've also added a snapshot of the element in the iFrame.

You do not have the required permissions to view the files attached to this post.

Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: web elements not recognized in iFrame

Post by krstcs » Fri Apr 24, 2015 2:48 pm

Please also include the following when raising issues:

Ranorex version
Windows version
Any error messages
XPath being used to identify the element, if the issues is identification related

In this case, without seeing the XPath you are using, I would suggest that the iframe needs to be specifically identified in your xpath or Ranorex may not be able to see any of the elements inside it. I would create a rooted folder for the iframe itself and place all child-elements under it in the repository. That makes it easier to adjust things in the future.
Shortcuts usually aren't...

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: web elements not recognized in iFrame

Post by Support Team » Mon Apr 27, 2015 3:40 pm

Hi Tim,

Due to security reasons can Ranorex unfortunately not identify any elements within an iFrame on mobile devices.
This is unfortunately nothing we can change, since this is a general restriction, see: Same-origin policy.

I am afraid you need to use image based or coordinate based actions for these elements within the iFrame.