Skip to content

Switch Actions Activity

The Switch Actions activity enables automation to switch focus between different browser windows, application windows, or frames within a web page. This allows the robot to interact with elements residing in various contexts within a single application or browser session.

Field Description Requirement
Application name Specifies the reference name of an already opened or attached application from a dropdown list. Required
Switch to Selects the target context within the application or page to switch to. Options include Window, Frame, Default Window, or Default Content. Required
Field When switching to a Frame, provide the XPath of any element within that frame. If Switch to is Default Window or Default Content, this field can be left blank. Required
Title When Switch to is Window, specify the title of the target window. The Match field determines how the title is compared. This field is not required if Match is set to Notitle or Next. Required
Match Defines the comparison method for the Title field when searching for a window. Options include Equals, Starts, Ends, Contains, Notitle, or Next. Optional
Retry Count Sets the maximum number of attempts the activity will make to perform the switch operation. The default value is 1. Optional

Action Types & Examples

Switch to: Window

  • Format: string
  • Example Result: "Window"

Switch to: Frame

  • Format: string
  • Example Result: "Frame"

Switch to: Default Window

  • Format: string
  • Example Result: "Default Window"

Switch to: Default Content

  • Format: string
  • Example Result: "Default Content"

Match: Equals

  • Format: string
  • Example Result: "Equals"

Match: Starts

  • Format: string
  • Example Result: "Starts"

Match: Ends

  • Format: string
  • Example Result: "Ends"

Match: Contains

  • Format: string
  • Example Result: "Contains"

Match: Notitle

  • Format: string
  • Example Result: "Notitle"

Match: Next

  • Format: string
  • Example Result: "Next"

Implementation Examples

Field Setup - Application name: ${robustaWebpage} - Switch to: Window - Switch to: Frame - Switch to: Default Window - Switch to: Default Content - Field: //input[@id="google_ads_iframe"] - Field: //div[@id="Content-Language"] - Field: * (when not required for Default Window or Default Content) - Title: Home – Robusta - Match: Equals - Match: Starts - Match: Ends - Match: Contains - Match: Notitle - Match: Next

Execution Parameters - Retry Count: 7

Technical Notes

The required fields for this activity may vary based on the selected Switch to and Match properties. If a target window lacks a title, the Match property can be set to Notitle or Next. The Next option specifically switches to the window that opens immediately after the currently active window.