Selecting XPath in iFrame

How does one target or select an XPath that is inside an iFrame?

So far the only solution I've been able to find is using Selenium to pull it off.

I have seen topics talking about something like this...


For example, but haven't been able to pass the iframe parameter in KM.

I can get the name of the iframe that's being loaded inside the page but, it's not working.

Thank You!

You can get to inner frames like this:

Note that you may have to “Disable Cross-Origin Restrictions” in Safari (in the Develop menu) depending on the frame.

I tried that code, and it was blank.

If I use this...


it will pull out some of the HTML from what looks like the frame, however I'm not able to pass an XPath to safari from inside that frame.

Long ago I messed with Firefox extensions. One thing I learnt from that was the security model didn’t allow you to get at what was in the iframe.

Probably the same thing is happening here. If you can use the iframe’s contents you might be on to something.

Sorry I’m fuzzy about the restrictions but this has been almost 15 years... :slight_smile: