Add Scripts to Workitem
To add the first script to the workitem select (click) the "Start settings" top level object (rectangle) and do one of the following:
- Right click the object and choose the "Add script" menu item
- Click the icon on the workitem editor tool bar
- Drag a script from the Scripts branch of the Project View and drop it onto the object or anywhere in the Workitem view.
- Drag tab of an opened script editor.
The script will appear in the view as a new box titled with the script file name. You may give it an optional display name. To add more scripts:
- Use the steps above to add other script calls to the top level object. Such scripts will be started in parallel.
- To add a script which depends on (follows, waits for completion of) the script click the script box and use one of the three actions described above on it.
For example, consider automation of a mobile phone application. There are two scripts to automate it on iOS (iOS.tpr) and Android (Android.tpr). The plan is to execute it first on an iOS 13 device and when it passes re-run it also on iOS 14. Automating on Android will be started in parallel. It will be first performed on an Android 10 device and if it succeeds will be re-run on an Android 11. The workitem will look as follows:
Each script object allows to specify the CLI options. The supported ones are:
- -c/--connect with the optional -p/--password one allow to specify the target System Under Automation (SUA) environment (server or device) to execute the script on. The above screen shot instructs Robot to start the script on the Android device of serial number A123456 connected over the Android Over ADB connection.
- -v/--variable set the specified script variable to a fixed value. It allows to pass execution specific values to the script. The option may be specified multiple times to set multiple variables.
Other applicable CLI options such as -n/--nodisplay or -o/--option are accepted only at the level of the Robot start command. They are then applied to all scripts in the workitem. See the Execute Workitem chapter for details on execution.