# Close browser

Node type `browser_closeBrowser`

## What it does

Close the browser selected by the node.

## Desktop client configuration

![Close browser configuration in the desktop client](/assets/close-browser.d5ec79b6aab03208276af6a24d54bba33ee38941b8b696844321b8840a3e6520.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 |
|  --- | --- | --- | --- | --- |
| `closeTarget` | `"current"` / `"specified"` (supports variable references) | No | `"current"` | Close target. Editor initial value `"current"` |
| `environment` | `string` | No | — | Environment ID |
| `afterClose` | `"none"` / `"specified"` (supports variable references) | No | `"none"` | Switch control after closing. Editor initial value `"none"` |
| `switchEnvironmentId` | `string` | No | — | Environment ID to switch to |


## Mode requirements and limits

- By default, no browser takes over control automatically after closing. When afterClose=specified, switchEnvironmentId must be another environment that is already open; this is validated before closing. Switching does not start an environment.
- Validation code `RPA_NODE_INPUT_INVALID`


## Input references

| Field | Allowed forms |
|  --- | --- |
| `closeTarget` | `literal`, `template` |
| `environment` | `literal`, `template` |
| `afterClose` | `literal`, `template` |
| `switchEnvironmentId` | `literal`, `template` |


## Outputs

| Output field | Type or values |
|  --- | --- |
| `environmentId` | `string` |
| `closed` | `true` |
| `isRunning` | `false` |
| `activeEnvironmentId` | `string` / `null` |
| `activeEnvironment` | `EnvironmentInfo` / `null` |
| `switchedControl` | `boolean` |


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_current",
  "type": "browser_closeBrowser",
  "data": {
    "title": "Close the current profile",
    "browserAction": "closeBrowser",
    "browserUi": {
      "inputs": {
        "closeTarget": "current",
        "afterClose": "none"
      },
      "exception": {
        "timeout": 30000,
        "policy": "interrupt"
      }
    }
  }
}
```

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