AI Command command
Uses AI to navigate and validate the open device screen using semantic and contextual information provided in natural language. Use this command to perform user actions and to validate the current state of the screen without having to specify the locators of UI elements. The AI Command command unifies and supersedes the AI User Action and AI Validation commands and is the recommended choice for all new tests.
An AI Command command simulates a user interaction with the graphical interface seen on the device, such as selecting a menu item, confirming a dialog, or verifying that certain elements or values are correctly visible. Perfecto AI empowers you to perform a variety of UI navigation and validation actions by letting you describe the process like you would talk to a person sitting next to you.
For instance, if you are testing online shopping for books, you give the assistant natural instructions like "Search for an Italian cookbook. Verify that la Cucina is visible in the results.", or "Confirm there is a hardcover edition shown. Order the hardcover edition", "Pay with voucher code ABC123. Check that the code validates." The assistant can identify the referenced buttons and fields. You do not need to break the scenario down into individual clicks, nor explicitly name UI elements nor locators. Use a series of natural-language commands to describe more complex scenarios, such as filling in forms.
For more usage best practices, see Best practices for working with AI Commands.
Each AI Command can trigger up to 30 UI actions (such as clicking, scrolling, and so on) and the execution limit per call is 3 minutes. For optimal performance, phrase your test steps so they do not resolve to more than 15 actions.
After running the same test steps repeatedly, the symbol
in the Single Test Report indicates that a step was handled by the semantic cache and did not require a LLM call.
|
Name |
Type |
Default |
Description |
|---|---|---|---|
|
Device ID* |
Device |
|
The device for this command. By default, this is the device under test (DUT). |
|
Prompt* |
String |
|
A natural-language description of an interaction that a user performs on the device screen, or of a validation of the device screen state. To learn more, see Perform AI-powered test steps. |
|
Reasoning |
Boolean |
Null |
Enable this option to allocate additional AI resources for tasks that require multi-step logical processing, such as counting elements, sorting items, or determining order. This may improve accuracy for commands involving structured analysis or decision-making. |
|
Comment |
String |
|
Adds a comment for reference. |
|
On-fail Result* |
Condition |
Ignore | Break | Continue | Abort | Catch |
The behavior when the user action fails. Default is to abort. |
* Mandatory