Commands
StrikeTest step commands for actions and assertions
Every step line is (Given|When|And|Then) [I] <command> …. Commands take qualifiers (for example with, on, to) and quoted values.
Core
navigate
Open a URL — navigate to "…"
fill
Type into a field — fill "…" with "…"
click
Click a control — click on "…"
double click
Double-click — double click on "…"
right click
Right-click — right click on "…"
force click
Force-click — bypass overlay checks
drag
Drag source to target — drag "…" to "…"
should
Assert text, URL, state, and values
wait
Wait for elements, text, URL, network idle, or response
Forms and selection
select
Native HTML select
pick
Custom combobox pick
open
Open combobox / open and pick
type
Typeahead then pick
pick date
Native date input
pick time
Native time input
set
Native range — set "…" to "…"
toggle
Toggle checkbox / switch — toggle "…"
clear
Empty an input
upload
File input upload
Slots and data
store
Capture into @ / @@ slots (UI or api json)
generate
Fresh dynamic values
calculate
Arithmetic into a slot
Scope and navigation
scope
iframe / frame scope
in
Element scope stack
scroll
Scroll to / down / up
switch
Switch browser tab
go
History back / forward
refresh
Reload the page
Pointer, keyboard, dialogs, evidence
hover
hover on "…"
press
Keys and chords
accept
Arm dialog accept
dismiss
Arm dialog dismiss
accept cookies
Consent banner allowlist click
capture screenshot
PNG under screenshots/
pause
Last-resort sleep — pause for "N" seconds
Browser data, viewport, clipboard (web only)
set cookie
set cookie "…" to "…"
set local storage
set local storage "…" to "…"
set session storage
set session storage "…" to "…"
clear browser data
Clear cookies and both storages
resize
resize to "375" by "812"
set clock
Fix Playwright clock to ISO datetime
copy
copy "…" to the clipboard
Control flow
Platform: api
Requires Platform: api and $API_BASE_URL. See Platform: api.
api get
GET — api get "/orders"
api post
POST + body / body file / multipart form
api put
PUT
api patch
PATCH
api delete
DELETE
api set header
Set session header
api set field
Queue one multipart text field
api set fields
Queue multipart fields from JSON
api set file
Queue a multipart file part
api should
Status, body contain, json path
api wait
Poll last request until JSON path matches
Quick index
| Command | Typical form | Purpose |
|---|---|---|
navigate | navigate to "url" | Open a page |
fill | fill "field" with "value" | Type into an input |
click | click on "Login" / … column | Click a button, link, or column header |
double click | double click on "Draft" | Double-click |
right click | right click on "Row 3" | Context-menu click |
force click | force click on "Submit" | Force-click (bypass overlay checks) |
drag | drag "Item A" to "Drop zone" | Drag and drop |
set | set "Volume" to "75" | Native range input |
toggle | toggle "Dark mode" | Toggle checkbox / switch |
should | should see "…", should have "…" be indeterminate | Assertions |
wait | wait for "…", wait for network idle, wait for response | Polling waits |
pause | pause for "2" seconds | Last-resort sleep |
capture screenshot | capture screenshot "checkout-step" | Write PNG under screenshots/ |
accept cookies | accept cookies | Consent banner allowlist |
select | select "US" from "Country" | Native <select> |
pick | pick "Canada" from "Country" | Custom combobox |
open | open "Tags" / open … and pick | Open / open+pick |
type | type "Can" in "Country" and pick "Canada" | Typeahead |
pick date | pick date "2026-06-15" in "Start date" | Native date |
pick time | pick time "09:30" in "Meeting time" | Native time |
store | store "@csrf" from "…" / from api json "$.id" | Capture into @ / @@ |
generate | generate "@guest" as email | Fresh dynamic values |
calculate | calculate "@line" as "50*3" | Arithmetic into a slot |
scope | scope to "Payment frame" | iframe / frame scope |
in | in "products" / in ".." / in "page" | Element scope stack |
hover | hover on "Profile" | Pointer over element |
press | press "Enter" on "password" | Keyboard |
scroll | scroll to "Submit" | Bring into view |
clear | clear "search" | Empty an input |
refresh | refresh | Reload page |
upload | upload "file.pdf" to "Attachments" | File input |
accept | accept "Are you sure?" | Arm dialog accept |
dismiss | dismiss "Session expired" | Arm dialog dismiss |
switch | switch to tab "Help" | Browser tab |
go | go back / go forward | History |
set cookie | set cookie "session" to "abc" | Cookie (web only) |
set local storage | set local storage "token" to "abc" | localStorage (web only) |
set session storage | set session storage "token" to "abc" | sessionStorage (web only) |
clear browser data | clear browser data | Clear cookies + storages (web only) |
resize | resize to "375" by "812" | Viewport size (web only) |
set clock | set clock to "…" | Fixed Playwright clock (web only) |
copy | copy "hello" | Clipboard write (web only) |
if / else if / else | if see "…" then click on "…" | Conditional branches (optional UI) |
api get | api get "/orders" | HTTP GET (Platform: api) |
api post | api post "/orders" with body '…' | HTTP POST |
api put / patch / delete | same body helpers | HTTP verbs |
api set header | api set header "Authorization" to "…" | Session header |
api set field | api set field "name" to "Invoice" | Multipart text field |
api set fields | api set fields to '{…}' | Multipart text map (JSON object) |
api set file | api set file "main" to "invoice.pdf" | Multipart file part |
api should | api should status "201" | Assert last response |
api wait | api wait until json path "$.status" be "ready" | Poll last request until path matches |
See also Qualifiers, Language, and Examples.
Syntax reminders
- All values are quoted (
"or'). - Env vars:
"$VAR_NAME"inside quotes. - Labels are plain text — never CSS or XPath.
#starts a comment line.- Planned (not implemented): API leftovers (query helpers / schema / GraphQL).