Journey Scripting > Actions > Switch To iFrame

Switch To iFrame

This action enables the WebDriver to switch to an iFrame and therefore allow it to control the iFrame.

The default By is 'cssSelector', but other options are available (see Parameters below).

Parameters

Name Required Description Example
Type Yes The action type SwitchToIFrame
Selector Yes The selector of the iFrame #content > iframe
By No The selector type className/cssSelector/id/name/linkText/partialLinkText/tagName/xpath

Example

{
    "Type":"SwitchToIFrame",
    "Selector":"#content > iframe"
}