Actions Reference

Complete reference for all 17 test step actions available in QA Studio, including their configuration fields, usage examples, and Playwright equivalents.

All Actions Overview

Every test step has an action type that determines what the step does. The following table lists all 17 actions available in QA Studio:

Action Internal Name Description Key Fields
Navigate goto Navigate the browser to a URL url
Click click Click an element on the page selector, selectorMode
Fill fill Type text into an input field selector, selectorMode, value
Select select Choose an option from a dropdown selector, selectorMode, value
Check check Check a checkbox selector, selectorMode
Uncheck uncheck Uncheck a checkbox selector, selectorMode
Hover hover Hover the mouse over an element selector, selectorMode
Press Key press Press a keyboard key or combination key
Wait wait Wait for a condition before proceeding waitType, value or selector
Screenshot screenshot Capture a screenshot of the page name, fullPage
Assert assert Verify page state against expected values assertType, condition, value
Use Flow use-flow Execute a reusable flow from the project flowId
If if Start a conditional block conditionType, condition fields
Else else Alternate branch of an if block (none)
End If end-if Close a conditional block (none)
Loop loop Start a loop block conditionType, maxIterations, condition fields
End Loop end-loop Close a loop block (none)

The Navigate action directs the browser to a specific URL. It is typically the first step in any test.

Field Type Required Description
url string Yes The URL to navigate to. Must include the protocol (http:// or https://).

The URL field supports environment variable substitution, so you can use dynamic URLs:

Example
{
  "action": "goto",
  "url": "{{BASE_URL}}/login"
}

Playwright equivalent: await page.goto(url)

Click

The Click action clicks an element located by the specified selector. Playwright automatically waits for the element to be visible and enabled before clicking.

Field Type Required Description
selector string Yes The selector value used to locate the element.
selectorMode string No The selector strategy. Defaults to css. See Selector Modes.
Example
{
  "action": "click",
  "selector": "submit-btn",
  "selectorMode": "testid"
}

Fill

The Fill action clears an input field and types the specified value. It targets text inputs, textareas, and contenteditable elements.

Field Type Required Description
selector string Yes The selector value to locate the input element.
selectorMode string No Selector strategy. Defaults to css.
value string Yes The text to type into the field. Supports {{variables}}.
Example
{
  "action": "fill",
  "selector": "Email Address",
  "selectorMode": "label",
  "value": "{{TEST_EMAIL}}"
}

Playwright equivalent: await page.getByLabel('Email Address').fill(value)

Select

The Select action chooses an option from a <select> dropdown by the option's value attribute.

Field Type Required Description
selector string Yes The selector to locate the <select> element.
selectorMode string No Selector strategy. Defaults to css.
value string Yes The option value attribute to select.
Example
{
  "action": "select",
  "selector": "#country",
  "selectorMode": "css",
  "value": "us"
}

Playwright equivalent: await page.locator('#country').selectOption('us')

Wait

The Wait action pauses test execution until a condition is met. There are three wait types, each with different required fields:

Wait Type Required Field Description
time value (milliseconds) Wait for a fixed duration. For example, 2000 waits for 2 seconds.
selector selector, selectorMode Wait until an element matching the selector appears on the page and becomes visible.
url value (URL or pattern) Wait until the browser URL matches or contains the specified value.
Wait for Time
{
  "action": "wait",
  "waitType": "time",
  "value": "3000"
}
Wait for Selector
{
  "action": "wait",
  "waitType": "selector",
  "selector": ".loading-complete",
  "selectorMode": "css"
}
Wait for URL
{
  "action": "wait",
  "waitType": "url",
  "value": "/dashboard"
}

Screenshot

The Screenshot action captures a screenshot of the current page state. Screenshots are used for visual regression testing and are stored with the test run results.

Field Type Required Description
name string Yes A descriptive name for the screenshot (e.g., "homepage", "after-login"). Used as the baseline identifier for visual regression.
fullPage boolean No If true, captures the entire scrollable page. If false (default), captures only the visible viewport.
Example
{
  "action": "screenshot",
  "name": "checkout-page",
  "fullPage": true
}

Playwright equivalent: await page.screenshot({ path: '...', fullPage: true })

Info

When a screenshot name matches an existing baseline, QA Studio uses pixelmatch to perform a pixel-level comparison. If differences are detected, a diff image is generated and the step result includes the mismatch percentage. See Visual Regression for the full approval workflow.

Assert

The Assert action verifies that the current page state matches an expected condition. If the assertion fails, the step fails and the test stops.

Assert Types

Assert Type Description Required Fields
visible Assert that an element matching the selector is visible on the page. selector, selectorMode
hidden Assert that an element matching the selector is not visible (hidden or absent). selector, selectorMode
text Assert that an element's text content matches the expected value using the specified condition. selector, selectorMode, condition, value
url Assert that the current page URL matches the expected value using the specified condition. condition, value
title Assert that the page title matches the expected value using the specified condition. condition, value
value Assert that an input element's current value matches the expected value using the specified condition. selector, selectorMode, condition, value

Assert Conditions

When an assert type requires a condition, you can use one of these three comparison modes:

Condition Description Example
equals Exact string match. The actual value must be identical to the expected value. URL equals https://example.com/dashboard
contains Substring match. The actual value must contain the expected value somewhere within it. Title contains Dashboard
matches Regular expression match. The actual value is tested against the expected value as a regex pattern. URL matches /users/\d+/profile
Assert Visible Example
{
  "action": "assert",
  "assertType": "visible",
  "selector": "Welcome back!",
  "selectorMode": "text"
}
Assert URL Contains Example
{
  "action": "assert",
  "assertType": "url",
  "condition": "contains",
  "value": "/dashboard"
}
Assert Text Matches Regex
{
  "action": "assert",
  "assertType": "text",
  "selector": ".order-number",
  "selectorMode": "css",
  "condition": "matches",
  "value": "^ORD-\\d{6}$"
}

Use Flow

The Use Flow action executes a reusable flow from your project. Flows are shared step sequences that can be referenced across multiple tests, reducing duplication.

Field Type Required Description
flowId string Yes The ID of the flow to execute. Selected from a dropdown of flows available in the current project.

When the test runner encounters a Use Flow step, it resolves the flow's steps and executes them inline. Flows can reference other flows, up to a maximum nesting depth of 10 to prevent infinite recursion.

Example
{
  "action": "use-flow",
  "flowId": "flow_abc123"
}
Info

The flow dropdown in the step editor only shows flows from the same project. If the referenced flow is deleted, the Use Flow step will fail at runtime with an error indicating the flow could not be found.

Press Key

The Press Key action simulates pressing a keyboard key or key combination.

Field Type Required Description
key string Yes The key to press. Uses Playwright key names: Enter, Tab, Escape, Backspace, ArrowDown, Control+a, etc.
Example
{
  "action": "press",
  "key": "Enter"
}

Playwright equivalent: await page.keyboard.press('Enter')

Check & Uncheck

The Check action checks a checkbox element, and Uncheck unchecks it. Both require a selector to locate the checkbox.

Check Example
{
  "action": "check",
  "selector": "I agree to the terms",
  "selectorMode": "label"
}
Uncheck Example
{
  "action": "uncheck",
  "selector": "subscribe-newsletter",
  "selectorMode": "testid"
}

Hover

The Hover action moves the mouse pointer over an element, triggering any hover-related effects (CSS :hover, tooltip display, dropdown menus, etc.).

Example
{
  "action": "hover",
  "selector": "nav-menu",
  "selectorMode": "testid"
}

Playwright equivalent: await page.getByTestId('nav-menu').hover()


Selector Modes

Actions that target page elements (Click, Fill, Select, Check, Uncheck, Hover, and some Assert/Wait types) support a selectorMode field that determines how the selector string is interpreted:

Mode Selector Input Playwright Equivalent Best For
css .btn-primary page.locator('.btn-primary') Complex CSS selectors, ID targeting, class-based selection
text Sign In page.getByText('Sign In') Buttons and links with unique visible text
role button:Submit page.getByRole('button', { name: 'Submit' }) Accessible elements with ARIA roles. Format: role:name
placeholder Enter email page.getByPlaceholder('Enter email') Input fields with distinctive placeholder text
label Email Address page.getByLabel('Email Address') Form fields with associated <label> elements
testid submit-btn page.getByTestId('submit-btn') Elements with data-testid attributes. Most stable and recommended.
Tip: Choosing a Selector Mode

For the most resilient tests, prefer testid (requires data-testid attributes in your app), then role or label for form elements, then text for buttons/links, and use css as a last resort. The recorder automatically picks the best available mode using the 7-tier priority system.

Control Flow Actions

The If, Else, End If, Loop, and End Loop actions provide conditional execution and looping capabilities. These are covered in detail on the Control Flow page.

Environment Variables in Actions

All text-based fields (url, value, selector) support environment variable substitution using the {{variableName}} syntax. Variables are resolved at runtime from the project's environment variables. This allows you to parameterize tests for different environments:

Variable Substitution
{
  "steps": [
    { "action": "goto", "url": "{{BASE_URL}}/login" },
    { "action": "fill", "selector": "#email", "value": "{{TEST_USER}}" },
    { "action": "fill", "selector": "#password", "value": "{{TEST_PASS}}" },
    { "action": "click", "selector": "Sign In", "selectorMode": "text" }
  ]
}

See Environment Variables for details on creating and managing variables.