# Switch tab

Node type `browser_switchPage`

## What it does

Change the tab used by subsequent page actions.

## Desktop client configuration

![Switch tab configuration in the desktop client](/assets/switch-page.2cbf1ab6be6a01441f6b7d8cc342067b6f8151811c7869574fd27cafdd93b712.0538f3a9.webp)

Captured in the English interface of MoreLogin Desktop V2.73.101.

## Inputs

These fields belong in `data.browserUi.inputs`.

| Field | Type or values | Schema required | Execution default | Description and bounds |
|  --- | --- | --- | --- | --- |
| `type` | `"url"` / `"title"` / `"tabId"` / `"tabOrder"` (supports variable references) | No | `"url"` | Find by. Editor initial value `"url"` |
| `relation` | `"equal"` / `"notEqual"` / `"contain"` / `"notContain"` (supports variable references) | No | `"contain"` | Match condition. Editor initial value `"contain"` |
| `content` | `string` | No | — | Match content |
| `tabId` | `string` | No | — | Tab ID |
| `tabOrder` | `WorkflowNumber` | No | `1` | Tab index; integer; minimum after resolution: 1. Editor initial value `1` |
| `postWaitMs` | `WorkflowNumber` | No | `300` | Wait after completion (ms); minimum after resolution: 0. Editor initial value `300` |


## Mode requirements and limits

**`type` `eq` `"url"`**

- Required `content`
- The match content must not be empty.
- Validation code `RPA_NODE_INPUT_INVALID`


**`type` `eq` `"title"`**

- Required `content`
- The match content must not be empty.
- Validation code `RPA_NODE_INPUT_INVALID`


**`type` `eq` `"tabId"`**

- Required `tabId`
- The value must be a real tab ID.
- Validation code `RPA_NODE_INPUT_INVALID`
- type=url/title requires content; type=tabId requires tabId; type=tabOrder uses tabOrder, which starts at 1.
- Validation code `RPA_NODE_INPUT_INVALID`


## Input references

| Field | Allowed forms |
|  --- | --- |
| `type` | `literal`, `template` |
| `relation` | `literal`, `template` |
| `content` | `literal`, `template` |
| `tabId` | `literal`, `template` |
| `tabOrder` | `literal`, `numericExpression` |
| `postWaitMs` | `literal`, `numericExpression` |


## Outputs

| Output field | Type or values |
|  --- | --- |
| `tab` | `TabInfo` |
| `previousTabId` | `string` / `null` |


Reference published fields as `${nodeId.data.field}`.

## JSON example

A complete node object for a workflow's `nodes` array or another node's `blocks`.

```json
{
  "id": "back_to_checkout",
  "type": "browser_switchPage",
  "data": {
    "title": "Switch back to the checkout tab",
    "browserAction": "switchPage",
    "browserUi": {
      "inputs": {
        "type": "url",
        "relation": "contain",
        "content": "/checkout",
        "postWaitMs": 300
      },
      "exception": {
        "timeout": 30000,
        "policy": "interrupt"
      }
    }
  }
}
```

[Back to the node catalog](/browser-rpa/nodes)