# Close tab

Node type `browser_closePage`

## What it does

Close a browser tab when work on that page is complete.

## Desktop client configuration

![Close tab configuration in the desktop client](/assets/close-page.754e985de49415f307c30d223fe35020e64d03cda098a1ab5956be1b898892f9.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 |
|  --- | --- | --- | --- | --- |
| `scope` | `"current"` / `"others"` / `"specified"` (supports variable references) | No | `"current"` | Close scope. Editor initial value `"current"` |
| `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

- Only scope=specified uses type/relation/content/tabId/tabOrder. Matching rules are the same as for switchPage.
- Validation code `RPA_NODE_INPUT_INVALID`


## Input references

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


## Outputs

| Output field | Type or values |
|  --- | --- |
| `closedTabs` | array<`TabInfo`> |
| `remainingTabCount` | `number` |
| `activeTab` | `TabInfo` / `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": "close_help_tab",
  "type": "browser_closePage",
  "data": {
    "title": "Close the help tab",
    "browserAction": "closePage",
    "browserUi": {
      "inputs": {
        "scope": "specified",
        "type": "url",
        "relation": "contain",
        "content": "/help",
        "postWaitMs": 300
      },
      "exception": {
        "timeout": 30000,
        "policy": "interrupt"
      }
    }
  }
}
```

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