Developer

Playwright (Local)

Run browser checks in pinned Chromium on your OrgSDK project runner. Inspect page status and text, capture screenshots and reuse sign-in state.

View 16 plugin functions ↓

Use Playwright (Local) in a project

  • Check a development preview from a project action
  • Interact with page elements and capture a PNG screenshot
  • Reuse a named browser session for a signed-in check

Access and credentials

Downloads Playwright's pinned Chromium into project runner storage. Opens websites from the runner, can submit forms and execute JavaScript in the open page, and returns page content, accessibility snapshots and screenshots to OrgSDK. Named sessions store sign-in cookies and browser storage in project runner data for later actions. Headful mode opens Chromium on the runner display.

This plugin does not declare a stored credential requirement.

Install Chromium on the project runner

In Studio, open your project’s Plugins page and enable Playwright (Local). Paste this example into an action in the same project.

// Download the browser once before running a page check.
return await playwrightLocal.installBrowser({});

The receipt identifies Chromium and its pinned Playwright version. An installed value of true means this project runner has the browser files.

Workflow examples and guides

Use with OrgSDK

OrgSDK gives external AI clients persistent projects and controlled execution. Plugins add optional tools to those projects. Each run uses pinned plugin versions, and project configuration determines which credentials they can use.

Set up OrgSDK locally ↗

Capabilities

16 functions from this published version. Read calls retrieve or process information; write actions can change data in the connected service.

16 of 16 functions

Check whether pinned Chromium is installed for this project runner.

Parameters and return value
ParameterTypeDetails
headlessOptionalbooleanDefaults to true (Chromium Headless Shell). False selects full Chromium on the runner display.

Returns Promise<{ browser: string; playwrightVersion: string; installed: boolean }>

Download this plugin's pinned Chromium into project runner storage. Run once per project runner before browser automation.

Parameters and return value
ParameterTypeDetails
headlessOptionalbooleanDefaults to true (Chromium Headless Shell). False selects full Chromium on the runner display.

Returns Promise<{ browser: string; playwrightVersion: string; installed: boolean }>

Open an isolated blank page or resume a named session at its saved URL. Close with closePage to checkpoint sign-in state.

Parameters and return value
ParameterTypeDetails
viewportOptional{ width: number; height: number }Viewport in CSS pixels. Defaults to 1280 × 720.
headlessOptionalbooleanDefaults to true (Chromium Headless Shell). False selects full Chromium on the runner display.
sessionOptionalstringProject-runner session name. Use 1–64 lowercase letters, digits, underscores or hyphens, starting with a letter or digit.
timeoutMsOptionalnumberPlaywright operation timeout in ms (1–240000, default 60000).
idleTimeoutMsOptionalnumberClose and save after inactivity between calls, in ms (1000–3600000, default 300000).

Returns Promise<null>

Navigate the open page to an HTTP(S) URL.

Parameters and return value
ParameterTypeDetails
urlstringHTTP(S) URL reachable from the project runner.

Returns Promise<{ url: string; status: number | null }>

Click the element matching a Playwright selector.

Parameters and return value
ParameterTypeDetails
selectorstringPlaywright selector for the target element.

Returns Promise<null>

Replace the value of an editable field.

Parameters and return value
ParameterTypeDetails
selectorstringPlaywright selector for the target element.
valuestringValue to enter.

Returns Promise<null>

Wait until the element matching a selector is visible.

Parameters and return value
ParameterTypeDetails
selectorstringPlaywright selector for the target element.

Returns Promise<null>

Read the rendered text of the matching element, up to 1,000 characters.

Parameters and return value
ParameterTypeDetails
selectorstringPlaywright selector for the target element.

Returns Promise<string>

Read the current page title and URL.

Parameters and return value

This call takes no parameters.

Returns Promise<{ url: string; title: string }>

Press a key or shortcut on the focused element, or focus the given selector first.

Parameters and return value
ParameterTypeDetails
keystringPlaywright key or shortcut, such as Enter or Control+a.
selectorOptionalstringPlaywright selector for the target element.

Returns Promise<null>

Choose options in a native select by value. Returns the selected option values.

Parameters and return value
ParameterTypeDetails
selectorstringPlaywright selector for the target element.
valuestring | string[]An option value, or a list of values for a multiple-select.

Returns Promise<string[]>

Read the page accessibility tree as Playwright ARIA snapshot text with element references. Optionally scope it to a selector.

Parameters and return value
ParameterTypeDetails
selectorOptionalstringPlaywright selector for the target element.

Returns Promise<string>

Evaluate JavaScript in the open page. Awaits promises, can modify the page, and returns the JSON result (null for undefined).

Parameters and return value
ParameterTypeDetails
expressionstringJavaScript expression or zero-argument function, such as document.title.

Returns Promise<unknown>

Capture the viewport or full scrollable page as a base64 image. Defaults to a viewport PNG. Use JPEG for larger pages.

Parameters and return value
ParameterTypeDetails
fullPageOptionalbooleanCapture the full scrollable page when true.
formatOptional"png" | "jpeg"Image format. Defaults to PNG.
qualityOptionalnumberJPEG quality from 0 to 100.

Returns Promise<string>

Save a named session and close the page. An unnamed session is discarded.

Parameters and return value

This call takes no parameters.

Returns Promise<null>

Delete saved sign-in state and the resume URL for this named session on the project runner. Close its page first.

Parameters and return value
ParameterTypeDetails
sessionstringProject-runner session name. Use 1–64 lowercase letters, digits, underscores or hyphens, starting with a letter or digit.

Returns Promise<null>