Skip to main content
Browser automations are built in code using three layers: Page (AI-enhanced Playwright), Agent (multi-step AI goals), and Browser (cloud Chromium instance). This page lists every operation available on a Page or through an Agent. For the full SDK documentation with all parameter options, see the SDK Reference. If you’re building automations visually instead, see Block Types and Configuration for the equivalent operations in the Cloud UI agent editor.

Quick reference

Page actions

Agent methods

Form automation (Python only)

iframe management (Python only)


Page actions

act

Perform any action described in natural language.
Returns: None SDK reference: act

extract

Pull structured data from the visible page.
Returns: dict, list, str, or None SDK reference: extract

validate

Assert a condition about the current page state.
Returns: bool SDK reference: validate

prompt

Ask the LLM a question about the current page.
Returns: dict, list, str, or None. Without a schema, returns a dict of the form {"llm_response": "..."} (TypeScript: { llmResponse: "..." }). With a schema, returns data shaped to your schema. SDK reference: prompt

click

Click an element using a selector, AI prompt, or both.
Returns: str \| None (resolved selector) SDK reference: click

fill

Fill an input field using a selector, AI prompt, or both.
Returns: str (resolved selector) SDK reference: fill

select_option

Select a dropdown option using a selector, AI prompt, or both.
Returns: str | None (resolved selector) SDK reference: select_option

type

Type text character-by-character. Unlike fill, this triggers keystroke events for each character, so use it for fields that react to individual key presses (search autocomplete, OTP inputs). Python only.
Returns: str (resolved selector) SDK reference: type

hover

Move the mouse over an element. Python only.
Returns: str (resolved selector) SDK reference: hover

scroll

Scroll the page by a pixel offset along the x and y axes. Python only.
Returns: None SDK reference: scroll

upload_file

Upload one or more files to a file input. Pass a selector for direct Playwright behavior, a prompt for AI-powered file input detection, or both. Python only.
Returns: str (resolved selector) SDK reference: upload_file

locator

Locate an element using a CSS/XPath selector, an AI prompt, or both. When called with a prompt, returns an AILocator, a lazy Playwright Locator that resolves the element via AI on first use. Python only.
When called with only a selector (no prompt), page.locator(selector) behaves exactly like the standard Playwright page.locator(selector). No AI is involved.
Returns: Locator (standard Playwright Locator when only a selector is given, or AILocator when a prompt is provided)

AILocator methods

When prompt is provided, the returned AILocator supports all standard Playwright Locator methods:
  • Actions: click(), fill(), type(), select_option(), check(), uncheck(), clear(), hover(), focus(), press()
  • Queries: text_content(), inner_text(), inner_html(), get_attribute(), input_value(), count()
  • State: is_visible(), is_hidden(), is_enabled(), is_disabled(), is_editable(), is_checked()
  • Chaining: first(), last(), nth(), filter(), locator(), get_by_text(), get_by_role(), get_by_label(), get_by_placeholder()
  • Utilities: wait_for(), screenshot(), playwright_locator (access raw Locator)
SDK reference: locator

Agent methods

All agent methods return either a TaskRunResponse (for agent.run_task) or a WorkflowRunResponse (for agent.login, agent.download_files, agent.run_workflow). Follow the links for the full field list.

agent.login

Authenticate with stored credentials. Handles multi-page login flows, CAPTCHAs, and 2FA.
Returns: WorkflowRunResponse SDK reference: agent.login

agent.run_task

Run a multi-step AI task on the current page.
Returns: TaskRunResponse SDK reference: agent.run_task

agent.download_files

Navigate and download files from the current page.
Returns: WorkflowRunResponse SDK reference: agent.download_files

agent.run_workflow

Run a Cloud UI workflow on the current page.
Returns: WorkflowRunResponse SDK reference: agent.run_workflow

Form automation (Python only)

fill_form

Fill a single-page form using AI. Pass a data dict describing the values to fill.
Returns: None SDK reference: fill_form

fill_multipage_form

Fill a form that spans multiple pages, handling page transitions automatically.
Returns: int (the number of pages filled) SDK reference: fill_multipage_form

fill_from_mapping

Fill form fields using an explicit index-based mapping produced by extract_form_fields. Use this when you need precise control over which field gets which value.
Returns: None SDK reference: fill_from_mapping

extract_form_fields

Extract all form fields with metadata from the current page. Use the output to drive fill_from_mapping or validate_mapping.
Returns: list[dict[str, Any]] where each dict contains field name, type, options, and other metadata. SDK reference: extract_form_fields

validate_mapping

Check if a field mapping is correct for the current form.
Returns: bool (True if the mapping is valid, False otherwise) SDK reference: validate_mapping

fill_autocomplete

Fill an input that has autocomplete/typeahead behavior. Types the value, waits for suggestions, then clicks the matching option.
Returns: str (resolved selector) SDK reference: fill_autocomplete

iframe management (Python only)

frame_switch

Switch the working context to an iframe. Exactly one of selector, name, or index must be provided.
Exactly one of selector, name, or index must be provided.
Returns: dict[str, Any] (frame metadata for the switched-to iframe) SDK reference: frame_switch

frame_main

Switch back to the main page frame after working inside an iframe.
Returns: dict[str, str] SDK reference: frame_main

frame_list

List all frames on the current page with metadata.
Returns: list[dict[str, Any]] (metadata for each frame on the page) SDK reference: frame_list