Close Browser
Close Browser
Section titled “Close Browser”Type: browser-close · Package: Browser v1.0.0
Close the browser and free its resources. It is the activity with which you end a web automation when you used Open Browser without body (Option B of the session model).
- If the session was opened by Zoan Automation (Open Browser), it closes it.
- If it was attached to an external browser (Attach Browser), it is disconnected without closing it.
How it works
Section titled “How it works”Receives the session and logs out or logs out accordingly. After this, the session can no longer be used.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
session | session | The session to close (ZoanPageSession for Open Browser, or ZoanBrowserSession for Attach Browser). |
Optional parameters
Section titled “Optional parameters”Ninguno.
Example
Section titled “Example”Open Browser browser = chrome → output: pagePage Navigate page = = page url = "https://example.com"... trabajo ...Close Browser session = = pageRelated activities
Section titled “Related activities”- Open Browser — open the session that you close here.
- Close Page — close only one tab, not the entire browser.
- Try / Catch — close on
finallyto avoid leaving browsers open.