Action qualifiers
with, on, to, from, in, and other action / binder keywords
These qualifiers appear on action and assertion commands. They are not find hints and not should state tasks.
Common binders
| Qualifier | Typical command | Example |
|---|---|---|
with | fill | When I fill "username" with "chamodh" |
on | click, double click, right click, force click, hover, press, should (container see) | When I force click on "Submit" |
to | navigate, scroll, upload, scope, switch, drag, set, set cookie, set local storage, set session storage, set clock, resize, api set header, api set field, api set fields, api set file | When I set cookie "session" to "abc" |
by (viewport height) | resize | When I resize to "375" by "812" — not a find hint |
from | select, pick, store | When I select "United States" from "Country" |
as | calculate, generate | When I generate "@guest" as email |
in | click (container), should (container see), pick date / pick time, type, element in | When I click on "Delete" in "Laptop" |
in row | click, should | When I click on "Edit" in row "chamodh@example.com" |
and pick | open, type | When I open "Country" and pick "Canada" |
to tab | switch | And I switch to tab "Help" |
back / forward | go | When I go back |
down / up | scroll | And I scroll down |
for / for see / until not see / until be on / for url contains / for network idle / for response | wait | And I wait for response "/api/orders" |
column | click | When I click on "Name" column |
seconds | pause | And I pause for "2" seconds |
with body / with body file | api post / put / patch / delete | When I api post "/orders" with body '{"item":"book"}' |
from api json | store | When I store "@id" from api json "$.id" |
status / body contain / json path / exist / be | api should | Then I api should status "201" |
until json path / be | api wait | And I api wait until json path "$.status" be "ready" |
then | if / else if | Separates condition from action — When I if see "Banner" then click on "Dismiss" |
see / not see (branch condition) | if / else if | One-shot page text presence for branches (not should see polling) |
Generate-only args (domain, length, charset, …): Generate qualifiers.
Element scope command (in)
Separate from one-shot click on … in "…". The in command pushes a nested element scope stack:
When I in "products"
And I click on "Add"
When I in ".."
When I in "page"| Form | Effect |
|---|---|
in "<region>" | Push nested scope under current root |
in ".." | Pop one level (fails if already at root) |
in "page" | Clear the element stack (iframe scope unchanged) |
iframe / frame scoping uses scope to instead — see scope.
Dialogs
When I accept "Are you sure?"
When I dismiss "Session expired"Arm the next browser dialog before the step that opens it. The quoted string is a message fragment.
Conditional branches (if / else if / else)
Contiguous line-by-line chains. Conditions in v1 are only see / not see. After then / else, one existing command runs. Unused branches are step SKIPPED (NDJSON may emit them; scenario summary stays PASSED/FAILED).
See if / else if / else.