Playwright Check

Playwright Check

Certified

Run browser checks with Playwright

Connects to a remote Playwright 1.63.0 server, opens one browser context, and runs an ordered list of browser actions and web-first assertions. A failed action stores a full-page screenshot and a Playwright trace in Kestra internal storage. For runs containing FILL or PRESS, the trace is skipped unless trace is ALWAYS. The server and Java client must use the same Playwright version.

yaml
type: io.kestra.plugin.playwright.Check

Run a post-deploy login smoke check

yaml
id: post_deploy_smoke_check
namespace: company.team

inputs:
  - id: app_url
    type: STRING
    defaults: https://staging.example.com

tasks:
  - id: smoke_check
    type: io.kestra.plugin.playwright.Check
    serverUrl: "{{ secret('PLAYWRIGHT_SERVER_URL') }}"
    baseUrl: "{{ inputs.app_url }}"
    actions:
      - action: NAVIGATE
        url: /login
      - action: FILL
        selector: "#email"
        value: "{{ secret('SMOKE_TEST_USER') }}"
      - action: FILL
        selector: "#password"
        value: "{{ secret('SMOKE_TEST_PASSWORD') }}"
      - action: CLICK
        selector: "button[type='submit']"
      - action: ASSERT_URL
        url: ".*/dashboard"
        regex: true
      - action: ASSERT_VISIBLE
        id: dashboard_header
        selector: "h1.dashboard-title"
      - action: SCREENSHOT
        name: dashboard.png

Run a scheduled checkout check

yaml
id: synthetic_checkout_check
namespace: company.team

triggers:
  - id: every_15_minutes
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "*/15 * * * *"

tasks:
  - id: checkout
    type: io.kestra.plugin.playwright.Check
    serverUrl: "{{ secret('PLAYWRIGHT_SERVER_URL') }}"
    baseUrl: https://shop.example.com
    actions:
      - action: NAVIGATE
        url: /products/demo-item
      - action: CLICK
        selector: "button.add-to-cart"
      - action: NAVIGATE
        url: /cart
      - action: ASSERT_TEXT
        selector: ".cart-count"
        text: "1"
      - action: ASSERT_VISIBLE
        selector: "a.checkout"
Properties

Actions

Ordered browser actions and assertions to run in one browser context. The list and its fields are rendered and validated before opening a browser session. Rendering happens once at list level: the whole actions list is rendered as Pebble, so each action field is a plain value rather than an individual Property.

Definitions
action*string
Possible Values
NAVIGATECLICKFILLPRESSWAIT_FORSCREENSHOTASSERT_VISIBLEASSERT_TEXTASSERT_URLASSERT_TITLE

Action

Action to execute: NAVIGATE (url), CLICK (selector), FILL (selector, value), PRESS (selector, key), WAIT_FOR (selector), SCREENSHOT (name, optional fullPage), ASSERT_VISIBLE (selector), ASSERT_TEXT (selector, text, optional regex), ASSERT_URL (url, optional regex), or ASSERT_TITLE (title).

fullPageboolean

Full-page screenshot

Capture the full scrollable page. Defaults to false.

idstring

Action ID

Optional identifier included in failure messages.

keystring

Key

Keyboard key or shortcut sent by PRESS, such as Enter or Control+A.

namestring

Screenshot name

Internal storage filename used by SCREENSHOT; cannot contain path separators or be . or ...

regexboolean

Regular expression

Treat text or url as a regular expression. Defaults to false. Patterns are validated with Java Pattern and evaluated by Playwright as JavaScript regular expressions; use syntax supported by both engines.

selectorstring

Selector

Playwright selector used by element actions and assertions.

textstring

Expected text

Expected element text for ASSERT_TEXT; may be empty.

titlestring

Expected title

Expected page title for ASSERT_TITLE; may be empty.

urlstring

URL

HTTP, HTTPS, or data target for NAVIGATE, or expected URL for ASSERT_URL.

valuestring

Value

Text entered by FILL. An empty string clears the input. The rendered value is never logged.

Playwright server URL

ws:// or wss:// endpoint of a remote Playwright server. Run the matching server with mcr.microsoft.com/playwright: v1.63.0-noble and npx -y playwright@1.63.0 run-server --port 3000 --host 0.0.0.0.

DefaultPT30S

Action timeout

Maximum time for each action and assertion. Defaults to PT30S. Minimum is PT0.001S and maximum is PT10M. The range is checked at runtime after rendering, before connecting to the browser.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

Base URL

Optional base URL used to resolve relative URLs in NAVIGATE actions.

DefaultCHROMIUM
Possible Values
CHROMIUMFIREFOXWEBKIT

Browser

Browser engine used for the check. Defaults to CHROMIUM.

Failure screenshot

Captures a full-page screenshot when an action fails. Enabled by default, including for runs containing FILL or PRESS, so failures stay debuggable. Entered values may appear in the image and in stored artifacts: limit access to them, or set to false for sensitive pages.

Include actual value in failures

Adds the actual page text or title to ASSERT_TEXT and ASSERT_TITLE failure messages. Defaults to false for runs containing FILL or PRESS, and true otherwise. The value is page content, so it ends up in execution logs and in the task error.

DefaultON_FAILURE
Possible Values
OFFON_FAILUREALWAYS

Trace mode

Controls trace recording: OFF, ON_FAILURE (default), or ALWAYS. Traces include network requests and headers (such as cookies and authorization headers), page snapshots, screenshots, and page content, so they may expose credentials and personal data. Use OFF for sensitive pages and limit access to stored traces. For runs containing FILL or PRESS, ON_FAILURE is skipped with a warning because traces can expose entered values. Set ALWAYS to opt in explicitly for those runs; the trace is then stored on success and on failure.

SubTypestring
Default{}

Screenshots

Internal storage URIs keyed by SCREENSHOT action name.

Formaturi

Trace

Playwright trace URI when trace is ALWAYS and no FILL or PRESS action is present. A warning is logged when tracing is suppressed; failure trace URIs are included in error messages.