iFrame Action

Overview

Support for iFrames lets you interact with elements embedded within iFrames on your website. This feature allows for user session audits, audit actions, journeys, and web journey manager to interact with embedded elements selectors inside an HTML document. iFrame stands for the inline frame and is an HTML element that can be embedded in another HTML document. Typically, the iFrame has its own content, such as advertisements, that act independently of the surrounding page it is on. The content within an iFrame can change without the page it is on being changed.

iFrame Action

The iFrame action type is available in user sessions, actions, journeys and Web Journey Manager as an action step. A brief example is provided below.


To interact with an iFrame change the action type to Switch to iFrame and add the selector element of the iFrame. The subsequent action steps will all interact within the iFrame, just like any other journey or audit.

If you want to go back to interacting with the main page, change the action type to Leave iFrame. Do this if your journey/audit contains additional steps outside of the iFrame. No selector is needed with the Leave iFrame action type.

On the Switch to iFrame action, add the selector by inspecting the iFrame element and copying the selector. Note: Interacting with an iFrame within an iFrame is available, i.e. nested iFrames.

For example, go to espn.com/login and right-click on the page and choose Inspect.

This login prompt is contained within an iFrame.
Copy the iFrame selector element

Copy the selector to add to your Switch to iFrame step.

Add this step prior to interacting with iFrame elements

Web Journey Manager (Beta)

The Web Journey Manager switches to iFrame automatically as you interact with iFrame elements. Clicking out of the iFrame will also automatically add a Leave iFrame step. These iFrame action types can be added manually if needed.

Manually add the Switch to iFrame step by changing the Action.
Change the selector method for the iFrame.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.