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 steps manually by adding an object and an action, using FT Design's artificial intelligence.

Tip: You can use the Windows keyboard shortcuts to redo or undo any changes made to a step in the Editor.

To manually add and edit a step:

  1. Make sure your application is open.

  2. To add a new step, move the cursor to the last step of the step list and press Enter.

  3. Click the double-arrow icon on the right to open the step editing pane. In the pane:

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

    2. If applicable, type a name for the object or use an input parameter to define the object name. For details, see Pass a value to a step.

    3. Select or accept the default action for the selected object. Your selections are added to the current step.

    4. For text steps, you can set the object class property to Partial Text. This capability finds your text anywhere and clicks it, even if it is part of a larger text block.

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

    5. 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.

    6. If relevant, click Add position. Specify a position and index for the object.

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

    7. If relevant, configure scroll settings and OCR languages for this step. For details, see Customize step settings.

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

    As you type, configure additional step details in the step editing pane, such as Action, Position, Partial Text, and Verify step options such as Exists.

  5. To add a step that navigates to a specific web URL or returns back to the previous URL, do one of the following:

    • Directly type Navigate to or Go back into an empty step box.

    • Hover over an empty step line, click the button, and select Navigation > Navigate to URL or Go back.

  6. To add a Wait command to your script, do one of the following:

    • Directly type Wait into the step box.

    • Hover over an empty step line, click the button, and select Wait.

  7. To omit a step temporarily from your test run, select the Exclude step from the test run check box on the step editing pane. You can re-enable it any time. For details, see Manage your script.

Back to top

Synchronize your script

You can synchronize your tests, 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.

Example:

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.

Example:

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

This section explains how to edit, move, duplicate, and otherwise manage the steps in your script.

To manage regular steps:

To... Do...
Edit a step

Edit a step using the syntax rules described in Step syntax.

As you type, you can check whether your syntax or object is valid.

Reorder a step

Hover over the vertical drag bar in the left margin, and drag the step to a preferred location in the step list.

Remove a step

Right-click the step and select Delete.

The last remaining step cannot be deleted, but you can manually remove its content.

Exclude a step from the test run

Do one of the following:

  • Right-click the step, and select Exclude from the test run.
  • Select the step in the Editor, and select Exclude step from the test run at the bottom of the step editing pane.

To include an excluded step, right-click it, and select Include in test run or clear the Exclude step from the test run option.

Duplicate a step

Do one of the following:

  • Right-click the step and select Duplicate. A same step is added right below the step.
  • Press CTRL, and drag the step to a preferred location. A same step is added to the row you want.
Copy and paste a step or step text
  • Select the step and use CTRL+C/+V to paste it to an empty row. The metadata is also copied and pasted.

    If you paste it to an existing step, a new step with same metadata are created in the next row.

    You can also paste it from your script to any other editors as plain text.

  • To copy and paste the text in a step, select the text, and use CTRL+C/+V.
  • You can copy and paste one or more plaintext steps from other sources to your script.

Note: After you successfully copied a step, the step is automatically copied to the clipboard in plain text.

Exclude, duplicate, or remove multiple steps

Select the steps, right-click, and select Exclude from the test run, Duplicate, or Delete.

Note:  

  • To include excluded steps, right-click them and select Include in test run.
  • You cannot delete all steps. An empty step still remains in the Editor.

To manage conditions:

To... Do...
Remove a condition block

Do one of the following:

  • Right-click the If step and select Delete block.
  • To remove the Else parts from an If/Else block, right-click the Else step and select Delete.

Exclude a condition block temporarily

Do one of the following:

  • Right-click the If step and select Exclude from test run.

    If you right-click the Else step and select Exclude from test run, only the Else parts are excluded.

    To restore the condition, right-click it, and select Include from test run.

  • Select the If or Else step in the Editor, and select Exclude condition from test run or Exclude else block from test run in the step editing pane.

    To restore the condition, clear the Exclude condition from test run or Exclude else block from test run option.

Duplicate a condition block

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

Note: The duplicate function is not supported for Else parts.

Exit a condition block

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

Manage steps inside a condition block

See To manage regular steps: to manage steps inside a condition block.

If you right-click the If step and select Delete, the If step is deleted and the rest part in the If or If/Else block becomes regular steps without indentation.

Note: An Else step becomes invalid if it exists independently.

Manage steps inside 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.

Back to top

See also: