Known issues with iframes in Ranorex Selocity


#1

You are using Ranorex Selocity to build selectors for your iframe-loaded web page and ended up here?
First of all, we’re sorry that you ran into one of the problems we have not yet solved :frowning:
Second, let’s have a look at the possible issues.

Ambiguous iframes

Issues observed:

  • Can not jump to parent iframe
  • Does not generate a correct selector
  • Does not generate correct screenshot when sending the selector to Ranorex Webtestit

Root cause:
Your web page might use the same iframe URL multiple times throughout the page. When two iframe source URLs are equal after taking away their fragment string (the part that comes after the #) they can not be properly distinguished by the Chrome Devtools, and therefore neither by Ranorex Selocity.

Example:
https://www.mywebsite.com/some/page?show=cart
is equal to
https://www.mywebsite.com/some/page?show=cart#fragment_part
but not to
https://www.mywebsite.com/some/page?show=checkout

This is a known limitation of the Chrome Devtools. While we cannot do much about it at the moment, we are constantly investigating workarounds and other ways to mitigate this issue. Please follow this topic for updates.

Workarounds:
Until then, here are a few things you can try to still get your selector:

  • To jump to a parent iframe, simply use the DevTools’ integrated DOM tree and move up until you hit an iframe. This is most likely the one you want.
  • If not, then you might be in a same origin iframe, and you have to traverse upwards until you find a cross origin iframe (the parent frame has a different URL to the child).
  • Still didn’t find one? You might be lucky and your iframe is fully same origin, meaning you won’t need the iframe element’s selector at all in your test!

If you still have issues and have access to the web page, you could get rid of the ambiguity, e.g. by adding an identifier to the query string (the part behind the ?) of the iframe source URL.

Or simply contact our support for assistance! We’ll gladly help you, and your use case might even help us to build a new workaround, improving your experience with future updates of Ranorex Selocity.