Skip to content

Attach Browser

Type: browser-attach  ·  Package: Browser v1.0.9  ·  Output: ZoanPageSession

Reuses a browser session you already have open, instead of opening a new one with Open Browser. Useful when a session was created earlier (in another part of the playbook, or in a sub-playbook you passed it to) and you want to keep working with it, or when several sections of the flow share the same browser.

It receives a page session (ZoanPageSession) stored in a variable. If you give it a body, the activities inside inherit that session automatically (you don’t need to pass page to each one), just like with Open Browser.

  • It doesn’t open or close anything: when the body finishes the browser stays open. Close it when you’re done with Close Browser.
  • It works with sessions the playbook already obtained (from Open Browser, New Page, Switch Page or Click with expectNewTab); it doesn’t connect to a browser the person opened on their own.
  • After the body, activities go back to the page they inherited before (if it was inside another body).
ParameterTypeDefaultDescription
pageZoanPageSession—The variable with the page session to pick up, e.g. page.

None.

Optional. Activities to run with this browser session. They inherit the session automatically.

  • Without body: returns the same ZoanPageSession it received.
  • With body: it doesn’t return a value.

Reuse, in a later section, a browser opened earlier with keepOpen:

Open Browser browser = chrome keepOpen = true → output: page
└─ body:
Page Navigate url = "https://portal.example.com"
... login ...
// later in the flow
Attach Browser page = page
└─ body:
Extract Structured Data selector = (#movimientos) → output: datos
Close Browser session = page
MessageCause and fix
'page' must be a valid ZoanPageSession object.The variable is empty or doesn’t hold a page session (for example, the output of Open Browser with body and without keepOpen, which returns nothing). Store the session with keepOpen = true or from Open Browser without body.