Manually create and edit steps

This topic describes how to manually create and fine tune steps in your script.

Manually add and edit steps

You can create and edit steps manually by typing them in the editor or using the button and selecting ready-made step templates.

Tip: You can undo or redo any changes you make to the script's steps in the Editor or the step editing pane using the Undo and Redo buttons. In the Editor, you can also use CTRL+Z / CTRL+Y.

To add a new step to your script, do one of the following:

  • Place the cursor at the beginning or end of a step and press Enter to create a step before or after the selected step. You can now type a step or click the button to select a step template.

  • Click the button and select the type of step you want to add. For example, you can select Click, Type, Verify, Wait, or Navigate steps.

    You can also select steps that set output parameter values or add Condition blocks, in which you can add steps that will run only under certain conditions.

    Modify the step template that is added with the details of your object and relevant values.

    Note: The button is displayed when you hover over a new empty step or below the last step in the script.

To edit steps in your script:

You can type directly into the step box, using the syntax rules described in Step syntax.

To further edit the step, click the double-arrow icon on the right to open the step editing pane. Changes you make in this pane affect the selected step in the script.

In this pane, you can fine-tune object identification details, select an action for the step, and modify additional step properties.

  1. Specify object identification details: 

    1. Type a class in the Object class drop down. Type the first letter to view a list of the available classes.

    2. (Optional) Enter text to use to identify the object. For example, the name of a button or a text box. Enter a text string or use an input parameter. For details, see Pass a value to a step.

      Sometimes, multiple text strings are identified near the object. You can select the one to use for object identification from a drop-down list within the Text box.

    3. For steps on Text objects, you can select Partial Text. This indicates the specified text should be identified even if it is only part of a larger text block.

      If you select the Partial Text option, a PT indicator is added to the step.

    4. If multiple similar objects are displayed in the application, click Add position to specify a specific instance. A position describes the object's ordinal location, and the direction in which to count.

      If you specify a position, a P indicator is added to the step.

  2. Select an action for the step.

  3. Specify additional step properties:

    • For a condition, select Exists or Does not exist to specify which condition the step checks and define a Timeout in seconds for how long to wait for the step's condition to be met.

    • (Optional) Configure scroll settings and OCR languages for this step. For details, see Customize step settings.

  4. (Optional) Select Exclude step from the test run, to temporarily omit the step from the script run.

    To re-include a step in the run, clear the Exclude step from the test run option.

    Similarly, you can exclude or re-include a condition block in the test run by selecting the If or Else step and using the exclude options available.

Back to top

Synchronize your script

You can synchronize your scripts, making sure steps are performed only when your application is ready for them.

You can add generic Wait steps, that simply wait for a specified number of second to pass, or more specific Verify steps, that check for the existence of a specific object.

We recommend using Verify steps that wait for a relevant object, rather than more arbitrary Wait steps.

Add a Wait step

Syntax: Wait <number> seconds

A Wait step instructs the script to pause the run for a specified number of seconds. This allows time for the application to be ready for the next step.


Copy code
Wait 6 seconds
Click the hamburger_menu
Click the profile
Type 'aidemo1' into 'USER NAME' input
Type 'Aidemo1' into 'PASSWORD' input
Click the 'LOGIN' button

Add a Verify step

Syntax: Verify <object> exists

A Verify step checks whether an object exists in the application. This ensures the object is present before the script performs any operation on it, increasing the test run success rate.

Define a timeout for the Verify step, to specify how long to wait for the object.

For details on adding and editing a Verify step, see Add verification steps.


Copy code
Verify the hamburger_menu exists
Click the hamburger_menu
Click the profile
Type 'aidemo1' into 'USER NAME' input
Type 'Aidemo1' into 'PASSWORD' input
Click the 'LOGIN' button

Back to top

Manage your script

The script editor supports standard editing functionality. You can edit, copy, paste, move, delete, and duplicate text, steps, and blocks by typing, using keyboard shortcuts, and right-click menus.

If you select multiple steps, you can use the right-click menu to Duplicate, Delete, or temporarily Exclude these steps from the run.

The steps in your script must follow the rules described in Step syntax. The editor indicates any syntax errors or erroneous steps.

This section provides some additional information about how to move, duplicate, copy and paste steps and how to manage condition blocks.

To... Do...

Copy and paste a step or step text

Select the step or the step's text and use CTRL+C / CTRL+V to copy and paste it to an empty row.

  • If you copied and pasted an entire step, its metadata is also copied and pasted.

  • If you paste a step into an existing step, a new step with same metadata is created in the next row.

  • You can copy and paste one or more plaintext steps from other sources to your script.

  • You can also paste a copied step or text from your script into any other editor as plain text.

  • You can copy a step that uses parameters from one script and paste it in another script. However, the parameters are not copied from one script to the other.

    Therefore, before pasting the step, make sure that the parameters it uses are defined in the script. You cannot create the parameters after pasting the step.

    If you pasted such a step before creating the necessary parameters, undo the paste, create the parameters, and paste the step again.

Move a step or condition block

Hover over the vertical drag bar in the left margin, and drag the step or block to the target location in the script.

To drag a block, use the vertical drag bar in the left margin of the If step.

While dragging, a line or frame is displayed, indicating where the step or block will be placed if you drop it.

Duplicate a step or block

Do one of the following:

  • Right-click the step and select Duplicate. A copy of the step is added right below the step.

    To duplicate a block, right-click the If step, and select Duplicate block. The whole If or If/Else block (including Else parts) is duplicated.

  • Press CTRL, and drag the step or block to the target location. A copy of the step or block is added at the selected location.

    To drag a block, use the vertical drag bar in the left margin of the If step.

    Note: Duplicating Else sections is not supported.

Duplicate steps from different condition blocks

If you duplicate multiple steps inside different condition blocks, all selected steps are copied to rows outside of the blocks in original execution order.

Exit a condition block

Select the last step of the condition block and press Enter twice to exit it.

Back to top

See also: