Editing script actions

Actions are the building blocks for capturing and creating powerful scripts to measure web performance. They are discrete operations that the script uses to represent user behavior, timing, and comparisons. Actions include navigation, mouse clicks, waits, and validations.

The icons in the interactive timeline at the top of the Recorder window provide a convenient way to edit these actions.

Add an action

Add an action to any step.

  1. Hold the mouse pointer over the action separator line timeline action separator in the timeline where you want to insert the new action.
    The icon appears over the separator.
    Add action icon

  2. Click to display the list of actions that you can insert.
    Add Action menu

  3. Click the action you want to add.
    The action is added to the timeline.
    Action added to the timeline

Use the action-specific editing screen below the timeline to define the action. For details, see the topic for the selected action under Script Actions. Also see Script actions and properties in the Advanced Scripting Guide.

Copy an action

You can copy one or more actions within your script and between scripts.

  1. Select the action to copy. When an action is selected, the name below the action icon is highlighted.
    Select an action
    To select consecutive actions, hold down the Shift key while you use the mouse to select the first and last action to cut.
    To select multiple separate actions, hold down the Ctrl key while you select each action.

  2. Right-click and select Copy. The selected actions are copied to the Clipboard.
    Copy the action

  3. Paste the action as described below.

Cut an action

Cutting removes the action and copies it into the Clipboard.

  1. Select the action to cut. When an action is selected, the name below the action icon is highlighted.
    Select an action
    To select consecutive actions, hold down the Shift key while you use the mouse to select the first and last action to cut.
    To select multiple separate actions, hold down the Ctrl key while you select each action.

  2. Right-click and select Cut.
    Cut the action
    The action is removed from the timeline and copied to the Clipboard.

  3. Past the action as described below.

Paste actions

You can paste actions within a script, or cut/copy actions in one script and paste them into another script. For example, if you need the same Custom action in several scripts, you can create the action once, then copy it to the other scripts.

  1. Hold the mouse pointer over the action separator line timeline action separator in the timeline where you want to add the actions.

  2. Click to display the list of actions.

  3. Select Paste Action.
    Paste an action

Move an action

To move one or more actions within a step or between steps, click-and-drag the action along the timeline.

To select consecutive actions, hold down the Shift key while you select the first and last action.

To select separate actions, hold down the Ctrl key while you select the actions.

Delete an action

Warning

You cannot undo this action. You will not be prompted to confirm the deletion.

  1. Select the action to delete.
    To select consecutive actions, hold down the Shift key while you select the first and last action to delete.
    To select separate actions, hold down the Ctrl key while you select the actions.

  2. Right-click and select Delete.
    If you have selected only one item, you can delete it by selecting the  icon on the upper right corner of the action.

  3. Click OK. The selected actions are deleted.

Comment out an action

When you comment out an action, that action is not executed during playback. It is not, however, removed from the timeline.

The Comment feature is available only for individual actions; steps cannot be commented out. If you comment out every action in a step, the step itself remains in the script and the agent will still process the step. Best practice is to delete commented actions, as described above, before uploading the script to the Dynatrace Portal. If all the actions in a step are commented out, delete the step. Deleting all the actions in a step does not remove the step from the script.

  1. Select the action to comment out.
    To select consecutive actions, hold down the Shift key while you use the mouse to select the first and last action to comment out.
    To select separate actions, hold down the Ctrl key while you select the actions.

  2. Right-click and select Comment. The actions are commented out and are dimmed in the timeline.
    Actions commented out

Restore a commented action

  1. Select the action to uncomment.
    To select consecutive actions, hold down the Shift key while you use the mouse to select the first and last action.
    To select separate actions, hold down the Ctrl key while you select the actions.

  2. Right-click and select Uncomment. The actions are no longer commented out, and are normal color in the timeline.