Skip to main content

Browser Automation

Type ID: core.browserAutomation  ·  Kind: Action  ·  Ports: 1 in, 1 out

Launches a Chromium browser with Playwright, optionally performs a form login (with TOTP support), then runs an ordered list of steps - navigate, fill, click, wait, and extract - returning the collected data.

Credentials​

None

Properties​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
URLurlstringYes''Start URL (or metrics URL)Always
Timeout (ms)timeoutMsnumberNo30000Default page timeout in millisecondsAlways
Include HTMLincludeHtmlbooleanNofalseInclude page HTML in output (can be large)Always
Auth Typeauth.typeoptionsNononenone - None; form - Form LoginAlways
Login URLauth.loginUrlstringNo''URL of the login pageauth.type = form
Username Selectorauth.usernameSelectorstringNo#emailCSS selector for the username fieldauth.type = form
Password Selectorauth.passwordSelectorstringNo#passwordCSS selector for the password fieldauth.type = form
Submit Selectorauth.submitSelectorstringNobutton[type=submit]CSS selector for the submit buttonauth.type = form
OTP Selector (optional)auth.otpSelectorstringNo''Selector for the OTP input, if the site asks for oneauth.type = form
OTP Submit Selector (optional)auth.otpSubmitSelectorstringNo''Selector to submit the OTPauth.type = form
Use TOTP (Authenticator) Automaticallyauth.useTotpbooleanNofalseGenerate the OTP from a TOTP secret in credentialsauth.type = form
StepsstepsarrayNo[]Ordered automation steps (see below)Always

Steps (nested fields)​

Each array entry is a step object with a type and type-specific fields.

FieldKeyTypeDefaultPossible valuesApplies when
Typetypeoptionsgotogoto - Go To; fill - Fill; click - Click; waitForSelector - Wait For Selector; waitForTimeout - Wait For Timeout; extract - ExtractAlways
URLurlstring''Target URLtype = goto
Wait UntilwaitUntiloptionsnetworkidleload - Load; domcontentloaded - DOM Loaded; networkidle - Network Idletype = goto
Selectorselectorstring''CSS selectortype = fill, click, waitForSelector
Valuevaluestring''Value to filltype = fill
Timeout (ms)timeoutMsnumber15000Wait timeout in millisecondstype = waitForSelector, waitForTimeout
Selectorsselectorsarray[]Extraction rules (see below)type = extract

Extract selectors (nested rule fields)​

Each entry is a selectorRule object:

FieldKeyTypeDefaultPossible valuesApplies when
KeykeystringmetricOutput key for the extracted valueAlways
CSS Selectorselectorstring[data-testid=metric]CSS selector to read fromAlways
Typetypeoptionstexttext - Text; texts - Texts; attr - Attribute; attrs - AttributesAlways
Attribute NameattrNamestringhrefAttribute to readtype = attr, attrs

Notes​

  • The browser launches non-headless. goto steps without their own url fall back to the top-level url.
  • Form login: if the OTP field appears and useTotp is false, execution throws; if useTotp is true without a totpSecret in credentials, it also throws. If the OTP field never appears within 8s, login continues without it.
  • Output is a single item { url, finalUrl, title, extracted, html?, timings }. Errors are caught and returned as { error: true, message, timings } rather than thrown; the page and browser are always closed afterward.