If the script includes substitution parameters, the preferred way to create the script is with the FormFill option turned on and the key capture option turned off. A script created in this manner in the Recorder may look like the following:
The FormFill actions are the points in the script timeline where data is entered into a field on the form. This example has two FormFill actions, one for a user name field and one for a password field.
There are two global parameters defined on the Parameters tab: UserName and Password. When the script is recorded, default values are entered for each. Once these parameters are defined, you can edit each FormFill action to replace the original data with a parameter reference.
The following image shows a FormFill step with its Value field edited to apply a substitution parameter. Click Apply Parameter and the available global parameters are displayed. First, select UserName and the parameter reference will replace the original value:
Once you've created parameter references for all the FormFill actions, you should test the script and then upload it into the Dynatrace Synthetic Monitoring system. The script is then available for incorporation into a browser test.
You can use the Test Management API to call
GetScripts() to discover the script id of the new script and then call
ProvisionTests() to provision a new Multi-Step monitor. Since the new script uses parameterized values, you can also use the Test Management API to manage those values.