Wait & Delay commands
delay Delay
Pauses execution for a number of seconds or milliseconds.
Give at least one of --seconds, --milliseconds.
Parameters
| Parameter | Value | Default | Description |
|---|---|---|---|
--seconds | number | How long to wait, in seconds (fractions allowed, e.g. 1.5); use --milliseconds instead for milliseconds | |
--milliseconds | number | How long to wait, in milliseconds (1000 = 1 second) |
Examples
delay --seconds:5
delay --milliseconds:500
wait Wait
Waits until something happens: a file appears, a window closes, the screen changes, an element shows up… After --timeout the task goes on (with a warning) unless --failontimeout:true.
Parameters of every variant
| Parameter | Value | Default | Description |
|---|---|---|---|
--timeout | number | 30 | Timeout in seconds |
--failontimeout | true / false | false | true: the command fails when the time is up (the nearest catch handles it); false: the task goes on and --output tells what happened |
--output | variable name | Receives true when the wait succeeded, false on timeout |
Types (--type)
--type:fileexists
Until the file (or a file matching the wildcard) exists.
| Parameter | Value | Default | Description |
|---|---|---|---|
--path required | text | File path; wildcards allowed, e.g. C:\Reports\*.xlsx (any matching file in the folder) A file on the agent machine. |
--type:filenotexists
Until no matching file exists (deleted or moved away).
| Parameter | Value | Default | Description |
|---|---|---|---|
--path required | text | File path; wildcards allowed, e.g. C:\Reports\*.xlsx (any matching file in the folder) A file on the agent machine. |
--type:folderexists
Until the folder (or a matching folder) exists.
| Parameter | Value | Default | Description |
|---|---|---|---|
--path required | text | Folder path; wildcards allowed, e.g. C:\Projects\2026* (any matching subfolder) A folder on the agent machine. |
--type:foldernotexists
Until no matching folder exists.
| Parameter | Value | Default | Description |
|---|---|---|---|
--path required | text | Folder path; wildcards allowed, e.g. C:\Projects\2026* (any matching subfolder) A folder on the agent machine. |
--type:windowexists
Until the window is open.
| Parameter | Value | Default | Description |
|---|---|---|---|
--window required | $variable$ | Window from window --action:open/attach, or a set --type:window pattern |
--type:windownotexists
Until the window is closed.
| Parameter | Value | Default | Description |
|---|---|---|---|
--window required | $variable$ | Window from window --action:open/attach, or a set --type:window pattern |
--type:screenchange
Until the screen (or a window, or an area of it) changes, or until it stops changing.
| Parameter | Value | Default | Description |
|---|---|---|---|
--window | $variable$ | Window to watch; the whole screen when empty. Mark area: drag a rectangle on the screen | |
--until | one of change, stable | change | change: until it looks different; stable: until it stays the same for --stablefor seconds |
--stablefor | number | 2 | With --until:stable, seconds without any change |
--x | number | 0 | Area to watch: left edge, relative to the window (or the screen) |
--y | number | 0 | Area to watch: top edge, relative to the window (or the screen) |
--width | number | Area to watch: width in pixels (the whole window when empty) | |
--height | number | Area to watch: height in pixels (the whole window when empty) | |
--tolerance | number | 0 | Percent of pixels that may change without counting, e.g. 1 ignores a blinking cursor or clock |
--type:desktopelement
Until the desktop element appears.
| Parameter | Value | Default | Description |
|---|---|---|---|
--window required | $variable$ | Window from window --action:open/attach, or a set --type:window pattern | |
--by required | one of automationid, name, classname, xpath, index | ||
--target required | text | Identifier value | |
--properties | text | Object properties of the captured element. Every checked property must match; the selector is built from them | |
--anchor | text | A nearby element that does not change, e.g. name=Amount, automationid=lblTotal, classname=Static or an XPath; among several matches of --target the one closest to it is used | |
--anchorposition | one of near, right, left, below, above | near | Where the element is, seen from the anchor: the closest match on that side is used |
--fallback | text | Other selectors to try when the first finds nothing, separated by " || ". Alternatives from the properties table are tried after them by themselves |
--type:desktopelementgone
Until the desktop element disappears.
| Parameter | Value | Default | Description |
|---|---|---|---|
--window required | $variable$ | Window from window --action:open/attach, or a set --type:window pattern | |
--by required | one of automationid, name, classname, xpath, index | ||
--target required | text | Identifier value | |
--properties | text | Object properties of the captured element. Every checked property must match; the selector is built from them | |
--anchor | text | A nearby element that does not change, e.g. name=Amount, automationid=lblTotal, classname=Static or an XPath; among several matches of --target the one closest to it is used | |
--anchorposition | one of near, right, left, below, above | near | Where the element is, seen from the anchor: the closest match on that side is used |
--fallback | text | Other selectors to try when the first finds nothing, separated by " || ". Alternatives from the properties table are tried after them by themselves |
--type:element
Until the web element is visible.
| Parameter | Value | Default | Description |
|---|---|---|---|
--browser | $variable$ | Browser from browser --action:open --output (default: the page used last) | |
--dompath required | text | XPath or CSS selector | |
--frame | text | Selector of the iframe the element is in, e.g. #payment; nested frames as outer >> inner. The page itself when empty | |
--properties | text | Object properties of the captured element. Every checked property must match; the selector is built from them | |
--anchor | text | Selector of a nearby element that does not change (a label, a heading); among several matches of --dompath the one closest to it is used | |
--anchorposition | one of near, right, left, below, above | near | Where the element is, seen from the anchor: the closest match on that side is used |
--fallback | text | Other selectors to try when the first finds nothing, separated by " || ". Alternatives from the properties table are tried after them by themselves |
--type:elementgone
Until the web element is hidden or removed from the page.
| Parameter | Value | Default | Description |
|---|---|---|---|
--browser | $variable$ | Browser from browser --action:open --output (default: the page used last) | |
--dompath required | text | XPath or CSS selector | |
--frame | text | Selector of the iframe the element is in, e.g. #payment; nested frames as outer >> inner. The page itself when empty | |
--properties | text | Object properties of the captured element. Every checked property must match; the selector is built from them | |
--anchor | text | Selector of a nearby element that does not change (a label, a heading); among several matches of --dompath the one closest to it is used | |
--anchorposition | one of near, right, left, below, above | near | Where the element is, seen from the anchor: the closest match on that side is used |
--fallback | text | Other selectors to try when the first finds nothing, separated by " || ". Alternatives from the properties table are tried after them by themselves |
--type:image
Until the picture is on the screen (or in the window).
| Parameter | Value | Default | Description |
|---|---|---|---|
--image required | text | The picture to look for: mark it on the screen (Capture picture), or a .png/.jpg/.bmp file on the agent machine | |
--window | $variable$ | Look only in this window (brought to the front first); the whole screen when empty | |
--similarity | number | 90 | How similar a spot must be, in percent (50–100). Lower finds pictures that changed a little (colours, smoothing); higher avoids look-alikes |
--type:imagegone
Until the picture is gone from the screen (a spinner, a "Please wait" banner).
| Parameter | Value | Default | Description |
|---|---|---|---|
--image required | text | The picture to look for: mark it on the screen (Capture picture), or a .png/.jpg/.bmp file on the agent machine | |
--window | $variable$ | Look only in this window (brought to the front first); the whole screen when empty | |
--similarity | number | 90 | How similar a spot must be, in percent (50–100). Lower finds pictures that changed a little (colours, smoothing); higher avoids look-alikes |
--type:pageload
Until the web page has loaded.
| Parameter | Value | Default | Description |
|---|---|---|---|
--browser | $variable$ | Browser from browser --action:open --output (default: the page used last) |
--type:url
Until the page URL matches.
| Parameter | Value | Default | Description |
|---|---|---|---|
--browser | $variable$ | Browser from browser --action:open --output (default: the page used last) | |
--value required | text | URL pattern (wildcards allowed) |
Examples
wait --type:fileexists --path:"C:\In\report-*.xlsx" --timeout:120
wait --type:filenotexists --path:"C:\In\~$report.xlsx" --output:closed
wait --type:windowexists --window:$erp$
wait --type:windownotexists --window:$progress$ --timeout:300
wait --type:screenchange --window:$erp$ --x:0 --y:40 --width:800 --height:500
wait --type:screenchange --until:stable --stablefor:3 --tolerance:1
wait --type:desktopelement --window:$erp$ --by:name --target:Save
wait --type:desktopelementgone --window:$erp$ --by:name --target:Loading
wait --type:element --dompath:"//div[@id='loaded']" --timeout:30
wait --type:elementgone --browser:$web$ --dompath:".spinner"
wait --type:image --image:"C:\Pictures\ok-button.png" --window:$citrix$ --timeout:60
wait --type:imagegone --image:"C:\Pictures\spinner.png" --similarity:85 --timeout:120
wait --type:pageload --timeout:60
wait --type:url --value:"*dashboard*" --timeout:30