Skip to content

ProbeScript Dictionary

Every word recognized by the ProbeScript parser, organized by category.

Commands that interact with the app’s UI.

CommandSyntaxDescription
taptap "Label" or tap #keyTap a widget by text label or key
double tapdouble tap "Label"Double-tap a widget
long presslong press "Label"Long-press a widget (triggers context menus)
typetype "text" into "Field"Enter text into a text field
clearclear "Field"Clear the contents of a text field
swipeswipe up/down/left/rightSwipe gesture on screen or widget
scrollscroll up/downScroll within a scrollable widget
dragdrag #source to #targetDrag one widget to another
go backgo backPress the device back button
openopen the appLaunch the app (CLI-side) and reconnect
closeclose the appClose the app
rotaterotate landscape or rotate portraitRotate the device orientation
toggletoggle "Dark Mode"Toggle a switch or checkbox
shakeshakeSimulate a device shake gesture
pausepausePause for 1 second

Commands that verify the state of the UI.

CommandSyntaxDescription
seesee "Text"Assert that text is visible on screen
don't seedon't see "Text"Assert that text is NOT visible
see exactlysee exactly 3 "Item"Assert exact count of matching widgets
see enabledsee "Submit" is enabledAssert widget is enabled
see disabledsee "Submit" is disabledAssert widget is disabled
see checkedsee "Agree" is checkedAssert checkbox/toggle is checked
see containssee "Price" contains "$"Assert widget text contains substring
see matchingsee "Email" matching ".*@.*"Assert widget text matches regex pattern

Commands that pause execution until a condition is met.

CommandSyntaxDescription
wait N secondswait 5 secondsWait for a fixed duration
wait until appearswait until "Dashboard" appearsWait until text becomes visible
wait until disappearswait until "Loading" disappearsWait until text is no longer visible
wait for page to loadwait for page to loadWait for the UI to settle (triple-signal sync)
wait for network idlewait for network idleWait for pending HTTP requests to complete

Commands that control the app process.

CommandSyntaxDescription
restart the apprestart the appForce-stop and relaunch (preserves data)
kill the appkill the appForce-stop without relaunching
open the appopen the appLaunch the app and reconnect
clear app dataclear app dataWipe all app data and relaunch (skipped on physical iOS)

Commands that manage OS-level app permissions.

CommandSyntaxDescription
allow permissionallow permission "camera"Grant a specific permission
deny permissiondeny permission "location"Revoke a specific permission
grant all permissionsgrant all permissionsGrant all known runtime permissions
revoke all permissionsrevoke all permissionsRevoke all runtime permissions

Supported permission names: camera, microphone, location, storage, notifications, contacts, phone, calendar, sms, bluetooth, photos.

Commands for capturing and comparing screenshots.

CommandSyntaxDescription
take screenshottake screenshot "name"Save a PNG screenshot
compare screenshotcompare screenshot "baseline"Compare against a visual regression baseline
dump treedump treeDump the widget tree for debugging

Commands for clipboard interaction.

CommandSyntaxDescription
copy to clipboardcopy "text" to clipboardCopy text to the device clipboard
paste from clipboardpaste from clipboardRead clipboard contents (stored in <clipboard> variable)

Commands for device-level operations.

CommandSyntaxDescription
set locationset location 37.7749, -122.4194Set GPS coordinates (emulator/simulator only)
verify external browserverify external browser openedAssert that url_launcher was called

Make HTTP requests from the CLI (not the device).

CommandSyntaxDescription
call GETcall GET "https://api.example.com/health"Send a GET request
call POSTcall POST "url" with body "{...}"Send a POST request with JSON body
call PUTcall PUT "url" with body "{...}"Send a PUT request
call DELETEcall DELETE "url"Send a DELETE request

Response variables: <response.status> (HTTP status code), <response.body> (response body).

Commands that control test execution flow.

CommandSyntaxDescription
if appearsif "Dialog" appearsExecute indented block only if widget is visible
otherwiseotherwiseElse branch for if block
repeat N timesrepeat 5 timesLoop an indented block N times

Modifier that silently skips an action when the target widget is not found.

CommandSyntaxDescription
tap if visibletap "OK" if visibleTap only if present, skip otherwise
type if visibletype "text" into "Field" if visibleType only if field exists
clear if visibleclear "Field" if visibleClear only if field exists
long press if visiblelong press "Item" if visibleLong press only if present
double tap if visibledouble tap "Item" if visibleDouble tap only if present

Dynamic placeholders that generate random data at runtime.

PlaceholderExample OutputDescription
<random.email>user_a7b3@test.comRandom email address
<random.name>Alice JohnsonRandom full name
<random.phone>+1-555-0142Random phone number
<random.uuid>550e8400-e29b-41d4...Random UUID v4
<random.number>42Random integer (0-9999)
<random.number(1,100)>73Random integer in range
<random.text(8)>xK4mP2qRRandom alphanumeric string

Keywords for organizing tests.

KeywordSyntaxDescription
testtest "name"Define a test case
reciperecipe "name" (param1, param2)Define a reusable recipe
useuse "path/to/recipe.probe"Import a recipe file
@tag@smoke @criticalTag a test for filtering with --tag
with exampleswith examples:Start a data-driven example table
with examples fromwith examples from "file.csv"Load examples from a CSV file

Lifecycle hooks that run around tests.

HookSyntaxDescription
before eachbefore eachRun before every test in the file
after eachafter eachRun after every test in the file
before allbefore allRun once before all tests in the file
after allafter allRun once after all tests in the file
on failureon failureRun when a test fails (for cleanup/screenshots)

Execute arbitrary Dart code on the device.

CommandSyntaxDescription
run dartrun dart: print('hello')Execute inline Dart code

Mock API responses for the app.

CommandSyntaxDescription
whenwhen the app calls GET "/api/users"Define a mock rule
respondrespond with 200 and body "[]"Define the mock response

How ProbeScript locates widgets in the Flutter widget tree.

SelectorSyntaxMatches
Text"Login"Widget whose text contains “Login”
Key#sign_in_buttonWidget with Key('sign_in_button') or Semantics(identifier: 'sign_in_button')
Ordinal2nd "Item"The 2nd widget matching “Item”
Positional"Price" in "Product Card"”Price” text within a “Product Card” container

These words are ignored by the parser — they make tests more readable but have no effect.

the, a, an, in, at, of, from, is, are, that, this, it, for

Example: tap the "Login" button is equivalent to tap "Login".