Perform AI-powered test steps

The AI Command Assistant can navigate the device screen like a user. Phrase your prompts like you would when describing a test step to a manual tester.

To have the test interact with the application, you no longer need to identify object locators or learn a scripting language. The AI Assistant understands natural language like "select London as travel destination." The assistant interprets your instructions accordingly as button clicks, menu selections, typing values in fields, and so on. The prompt is then included as the value for the Prompt parameter in the AI Command command.

The AI Command command unifies and supersedes the AI User Action and AI Validation commands. AI Command is the recommended choice for all new scripts. AI User Action and AI Validation continue to function for backward compatibility.

For examples and limitation, see Best practices for working with the AI Command

To have this functionality set up in your cloud, contact your Perfecto account representative. A separate license is required to access this feature.

To add the AI Command to a test:

To be able to add the AI Command, you need to open a device.

  1. In the left sidebar, on the Commands tab, click and drag or double-click the AI Command command to add it to the test editor.

  2. To enter the action or validation, do one of the following:

    • To enter the action or validation directly, double-click the field in the test editor.

    • Click the AI assistant button to open the AI assistant pane.

      In the field at the bottom, describe the logical goal you want the AI Command to perform, such as "Log in as Joe with password 123."

  3. (Optional) Include one or more variables in your AI Command:

    • To add a variable, type ${. This brings up the list of existing variables that have been defined. You can do this in the AI assistant pane, in the Action field on the Parameters tab when Usage is set to Constant, and when editing the AI Command step inline in the test editor.

      If Usage is set to Variable on the Parameters tab, typing ${ does not open the variable picker.

      Examples: Log in as ${username} with password ${pwd}

    • To create a variable, enter it in the following format: ${variable-name}

    • To create a temporary variable from a value on the screen at runtime, tell the assistant the new variable name and describe its value. The variable can be used in later steps, for example, in validations. For example:

      Put the maximum temperature into ${max_temp}.
      Identify the exchange rate shown and save it to ${rate}.
      Get the value of the account balance and put it into ${balance}.

    Values of variables entered as Secured String parameters are not shown in reporting steps.

    To learn more about variables in AI Scriptless, see Configure test variables.

  4. The Assistant confirms by repeating the instructions as it understood them and adds them in the test editor. Verify that the Assistant interpreted the command as intended.

    • If it needs time to process, the Assistant will say "Working on it..."
    • If needed, cancel the processing by starting to type another prompt or by clicking the Stop button.
  5. (Optional) During your conversation with the assistant, click thumbs-up on good answers, or click thumbs-down if the assistant's answer was not helpful. A screenshot and the reported response will be sent to the Perfecto AI feedback list. To get more information on the answers provided by the assistant, click the Explain button .

  6. (Optional) Add more AI commands and repeat the process.

  7. (Optional) To copy the suggested AI Command text to the clipboard, hover over the text and click the Copy to clipboard button next to the text.

Save and run the test.