Poliage

Step API

Complete reference for all step actions available in scenario definitions.

goto

Navigate to a URL.

{
  "action": "goto",
  "url": "/dashboard"
}
PropertyTypeRequiredDescription
urlstringURL to navigate to


Interactions

click

Click an element.

{
  "action": "click",
  "selector": "[data-testid='submit']",
  "description": "Click submit button"
}
PropertyTypeRequiredDescription
selectorstringElement selector
descriptionstringHuman-readable description

type

Type text into an input.

{
  "action": "type",
  "selector": "#email",
  "text": "user@example.com"
}
PropertyTypeRequiredDescription
selectorstringInput selector
textstringText to type

hover

Hover over an element.

{
  "action": "hover",
  "selector": "[data-testid='dropdown']"
}
PropertyTypeRequiredDescription
selectorstringElement selector


Waiting

wait

Pause for a fixed duration.

{
  "action": "wait",
  "ms": 1000
}
PropertyTypeRequiredDescription
msnumberMilliseconds to wait

waitFor

Wait for an element to appear.

{
  "action": "waitFor",
  "selector": ".loading-complete",
  "timeout": 5000
}
PropertyTypeRequiredDescription
selectorstringElement selector
timeoutnumberMax wait time (ms)


Capture

capture

Take a screenshot or video.

{
  "action": "capture",
  "key": "dashboard-hero",
  "selector": "[data-testid='hero']",
  "type": "screenshot",
  "crop": { "x": 0, "y": 0, "width": 800, "height": 600 }
}
PropertyTypeRequiredDescription
keystringUnique asset identifier
selectorstringElement to capture
typestringscreenshot or video
clipobjectViewport clip region
cropobjectPersisted crop region
durationnumberVideo duration (ms)


Selectors

Poliage supports multiple selector formats:

TypeExample
CSS.btn-primary, #submit, button.large
Playwrightrole=button[name="Save"]
Texttext="Welcome back"
Data Attribute[data-testid="nav-menu"]

Prefer data-testid attributes for stable, maintainable selectors.