Pre-General Availability: 2024-09-02

Add a Switch Browser Action

The switch browser action stops working in your current browser window or tab and switches to a different browser window or tab that is already open. You can also use the switch browser action to move past pop-up windows and pages.

Note:

You must use the low-code capabilities to add this action to a robot. Keep reading for step-by-step instructions.
  1. Open the robot to edit.
    1. In the navigation pane, select Projects.
    2. Select the project name.
    3. In the left toolbar, select Robot Robot.
    4. In the Robots box, select the robot to open.

      The canvas appears.

  2. Add the action to the robot.
    1. On the canvas, point to an action, and click +.
      A mouse cursor points to an action in the canvas and hovers over the plus sign button, which appears at the bottom of the rectangle that represents the action. A plus sign button also appears at the top of the rectangle, for adding an action after the current action.

      A menu of available actions appears.

    2. Select Switch Browser.

      A Switch Browser action appears on the canvas, and the Switch Browser panel appears.

  3. In the panel, enter a Name and Description for the action.

    The Name appears on the action in the canvas and should help you and others understand the goal of the action.

  4. On the Input tab, in the Browser window field, specify the index value of the browser window to switch to.

    You define the index value using the output for an open browser action. You can select the variable that stores the index value or hard-code a value. The index for the first open browser action in the robot is 1, the index for the second browser action in the robot is 2, and so on.

    Tip:

    To learn more about how to switch between browsers, see Use Case: Switch Browsers.
    1. Select within the Browser window field, and select Variables Variables.

      The Variables panel appears.

    2. If the variable to use doesn't exist yet, create it. See Create a Variable.
    3. From the Available variables list, select a variable, and drag it to the Browser window field.
  5. On the Input tab, if you want to capture a screenshot after the robot switches browsers, select Full page screenshot after this action.
  6. On the Post Validate tabs, specify whether to complete any validation after the action.
  7. Click OK.
  8. Above the canvas, select Save.