API Reference
Switch to iframe

Switch to Iframe Action API Reference ๐Ÿ–ผ๏ธ

Note: This is an early version (v0.1) of Go-Ski and is subject to change. Iframe switching is currently in very early stage beta. Still figuring ou the best way to handle traversing iframes (especially nested frames). Open to thoughts or suggestions!

Introduction ๐Ÿ“š

The SwitchToIframe action allows you to switch the context to an iframe on the web page. This is part of the core package in Go-Ski.

Syntax ๐Ÿ“

Here's how you define a SwitchToIframe action:

Action{
    Type: core.SwitchToIframe,
    IframeXPath: "/html/body/iframe",
}

Parameters ๐Ÿ› ๏ธ

  • Type: Should be set to core.SwitchToIframe.
  • IframeXPath: The XPath of the iframe you want to switch to.

Example ๐ŸŒŸ

Here's a simple example that switches to an iframe:

Action{
    Type: core.SwitchToIframe,
    IframeXPath: "/html/body/iframe",
}

Conclusion ๐ŸŽ‰

The SwitchToIframe action is crucial for interacting with web pages that use iframes. It allows you to switch context and perform actions within the iframe.

For the complete example, you can check out the Go-Ski GitHub Repository (opens in a new tab).