Editing a simplified script

You can edit a test line in the script editor and also modify the test line properties, such as the control actions in the Properties View.

About this task

In the script editor you can edit a test line that contains input values.

Procedure

  1. Select a test line in the script editor.
  2. Modify the input values.
  3. Click File > Save to save the modified script.
    Tip: You can also modify the input values on the General page in the Properties view.
    Note: You can cut, copy, and paste the test lines in the script editor. These options are available in the Edit menu.

Modifying the control name and the action

The General page in the Properties view displays the details of the test line that is selected in the script editor. On the General page, you can modify the test-line details such as the control name and the action.

Procedure

  1. Select the test line in the script editor.
    The test line details are displayed in the Properties view.
  2. Click the General tab in the Properties view.
    The General page opens.
  3. Modify the Control name value.
    The test line in the script editor also reflects the modified value.
  4. To modify the action on the control, select the required action from the list. The Action list displays all the actions that you can perform on the selected control.
    The test line statement in the script editor is modified.
  5. To modify the input values or the action details such as the screen coordinates or the path, modify the values in the Action Parameters field.
  6. Click File > Save to save the modified script.

Disabling a test line

You can disable a test line in the script editor so that the test line is not run during script playback.

Procedure

  1. Select the test line in the script editor.
  2. Right-click, and select Enable/Disable action.
    The test line font changes to italics, indicating that the test line is disabled.
  3. Click File > Save to save the modified script.

Grouping test lines

The test lines in the script editor are grouped based on the parent window that the test line control refers to. You can create more logical groups to manage the test lines for easy identification. For example, if you have multiple tabbed pages in a window, by default all the test lines are grouped into a main window group. You can create multiple groups within the main group for listing all the actions on the controls based on the tabbed pages.

Procedure

  1. In the script editor, select the test lines to group together.
    Press and hold the Ctrl key while selecting multiple test lines.
  2. Right-click, and select Create Group (Create group).
    A group title is added and all the selected test lines are grouped together. By default, the main parent window name is added as the group name. You can change the group name, if required.
  3. Click File > Save to save the modified script.

Inserting comments in the script

You can add comments in the simplified script editor.

Procedure

  1. Select the test line in the script editor.
  2. Right-click, and select Insert Comment (Insert comment).
    A test line with this text is inserted into the script: //Comment.
  3. Type your comments in the comment line.
    The comment text is displayed in italics. The comment lines are not executed during playback.
    Note: You can only specify single-line comments. Multiple-line comments are not supported.
  4. Click File > Save to save the modified script.

Repeating actions

You can repeat the action statements in the simplified script.

Procedure

  1. Select the test line or a group in the script editor.
    Press and hold the Ctrl key while selecting multiple test lines.
  2. Right-click, and select Repeat action (Repeat action).
    A Repeat title is added and the selected test lines are grouped into the Repeat group.
  3. In the Properties-General view, specify the number of times to run the statements in the Repeat Count field.
  4. Click File > Save to save the modified script.
    During script playback, the test lines in the Repeat group are run based on the repeat count.