Common command arguments
Learn common Maestro command arguments. Use labels to clarify steps or mask data, and optional to continue flows even if commands fail.
Some arguments are common to all commands.
Labels
Each Maestro command accepts an optional label attribute that lets you customize the command's name:
- tapOn:
id: buy-now
label: Tap on Buy Now button
- inputText:
label: Input the company email
text: [email protected]
- swipe:
direction: LEFT
label: Swipe for onboardingβ
Tap on Buy Now button
β
Input the company email
β
Swipe for onboardingSetting a label can have an additional advantage of being able to remove sensitive content from console output, for example this:
β
Tap on "Password"
β
Input text "mySecr3tPassw0rd!"becomes:
The values will still appear in the logs of the run.
Labels are also a useful alternative to comments for contributors trying to understand the intent of a particular step.
Optional
Each Maestro command accepts an optional optional attribute that lets control what should happen if the command fails.
If optional is set to true, the flow will continue executing even if the command fails. The warning will be displayed:
The default value of optional for almost all commands is false, which means that the flow will stop executing if any command fails. The only exception (at least for now) are AI-powered commands, which have optional set to true by default.
Last updated
Was this helpful?
