runScript
For more information regarding JavaScript, please refer to the Javascript section:
JavaScriptrunScript
command runs a provided JavaScript file.
appId: com.example
env:
MY_NAME: John
---
- launchApp
- runScript: myScript.js
- inputText: ${output.myFlow}
A script would typically perform some action and set an output value that could be accessed later. See Outputs for more information.
var uppercaseName = MY_NAME.toUpperCase()
output.myFlow = uppercaseName // returns 'JOHN'
Passing parameters
runScript
accepts env
parameters, in the same way as runFlow
does (see Nested Flows).
- runScript:
file: script.js
env:
myParameter: 'Parameter'
Console logging
Console logging is supported from the javascript files provided in runScript
command. Logs from javascript are redirected to the console when using Maestro CLI.
Note that console logging is not yet available in Maestro Cloud

Last updated
Was this helpful?