User Actions
The Autonomous Natural Language Processing (NLP) engine allows you to effortlessly create a custom flow test using simple, everyday language. This powerful technology lets you define steps using common English phrases like "Browse to http://example.com/" or "Click the OK button" without any coding required. You can include variables or parameters in a test to allow you to run the test in different scenarios.
As you enter instructions for a step, Autonomous provides helpful suggestions to guide you through the process.
Auto-Correction
The system automatically corrects syntax errors and divides complex steps into multiple simple steps, making them easier to read and understand. The Auto-Correct feature makes the following corrections to commands:
-
Grammar and Spelling – For example, "
Clack OK
" will automatically be corrected to "Click OK
". -
Break Down Complex Steps – Steps with multiple actions will be broken down into shorter, more manageable steps. For example, "
Enter "John" in "User name" and click OK
" will be divided into:[1] Enter "John" in "User name"
[2] Click "OK" -
Simplify and Standardize Commands – Steps will be modified to ensure consistency and clarity across all steps. For example, "
In the user name field, enter "John Smith"
," will be changed to "Type "John Smith" in the "User Name"
.
If steps were corrected, the icon indicates the number of corrections made. Hover over the icon to view details of the changes.
Examples
Below are examples illustrating how easy it is to create tests using Natural Language Processing. Notice how the commands are written in straightforward English, making them accessible even to those without programming or technical expertise.
Fill Out a Form
Go to https://sandbox.applitools.com/
Click "Form"Type "Jane Smith" in the "Your Name" field
Enter "janesmith@example.com" in the "Email" field
select "Technical Assistance" from dropdown below "Contact Reason"
Press ENTER
Click "Submit"
Open E-Commerce Page and Add Item to Cart
Go to https://sandbox.applitools.com/
Click "E-Commerce App"
Click "Outdoors"
Click "Small Succulent Planter Pot"
Select the second option from the "Variants" dropdown
Click "Increment"
Click "Add to cart"
Entering Instructions
When entering an action, identify a screen element, such as a button, text box, or image, and then specify what to do with that element, such as click, hover, or enter text.
Elements
Elements on the page can be identified in various ways, including:
-
Text label, for example,
"Get Started" button
. -
Position in a list, for example,
"The third item in the Language list"
. -
CSS Selector or X-Path selector ID, for example,
"gh-minicart-hover"
. -
Position in relation to another item, for example,
Checkbox to the right of "I agree"
. -
Location on the page, for example
button at the top of the page
.
Screen elements with more than one word should be in quotation marks ("...").
Common Commands
Here are examples of common commands that the NLP engine supports. This is not a complete list, as there is no limit to the types of commands you can create.
Command | Definition | Examples |
---|---|---|
Click |
Click on a screen item identified by text, location, or a CSS Selector or X-Path selector ID. |
Click "Advanced" Click "gh-minicart-hover" Click the "OK" button Click the first button Click the "Shopping Cart" icon Click the button below "Are you sure?" |
Type Enter |
Types text in a field |
Type "Jane Smith" in the "Your Name" field Enter "janesmith@example.com" in the "Email" field |
Select Choose |
Select an item from a drop-down list |
Select the third option in the "Country" field Choose "United States" in the "Country" field Choose "English" from the "Language" dropdown menu |
Go to Navigate to Browse to |
Opens a URL. The system automatically enters this as the first step in the test. |
Go to "https://applitools.com/platform/eyes/" Navigate to "https://applitools.com/solutions/mobile-testing/" Browse to "https://applitools.com/about/" |
Scroll |
Scrolls the screen up, down, left, or right. |
Scroll to the top of page Scroll left Scroll down 30 pixels Scroll to the "OK" button Scroll down 2 times |
Check / Uncheck |
Selects or clears a checkbox. |
Check "I agree" Check the second box Uncheck the checkbox to the right of "I would like to receive updates" Uncheck "Keep me signed in" |
Hover |
Positions the pointer over a screen element, this is useful to capture a tooltip or to select an item from a popup menu. |
Hover over "Company" Hover over "gh-minicart-hover" Hover over the first link |
Clear |
Removes text from a field. |
Clear the "First name" field |
Press Hit Enter |
Presses a keyboard key. |
Press ENTER Press ESCAPE Press backspace Press delete Hit TAB Press the left key |
Refresh Reload Soft refresh Hard refresh |
Refreshes the page A hard refresh clears cached data when the page is refreshed. This is the equivalent of pressing CTRL+F5 |
Refresh the page Reload the page Soft refresh the page Hard refresh the page |
Wait Pause Delay |
Waits before performing an action. This is useful if it may take time for a page to load or for a page with lazyload functionality. |
Wait 3 seconds Pause 5s Delay half a minute Wait for "Operation completed" to appear |
Popup Dialog |
Performs an action on a popup window that opens over the page |
Click the first link in the dialog Click "OK" in the popup |
go back go forward |
Clicks the browser Back or Forward button to go back to the previous page visited or forward to the next one |
go back go back 2 pages go forward |
switch to change to |
Changes the view to a different tab. This command is only valid if there is more than one tab open, for example a tab was opened in a previous step. |
switch to the browser tab titled "sign up" change to the second browser tab |
close |
Closes the current browser tab. This command is only valid if more than one tab is open. |
close the current browser tab |
Optionally |
Attempts to run the step, but if the step does not run successfully, continues to the next step without failing the test. |
Optionally click "Accept Cookies" Optionally click "OK" in the popup |
Pre-step Prestep Before each step Activate a prestep |
Attempts to run the step before all other steps. If the step does not run successfully, continues to the next step without failing the test. |
Before each step: wait 2 seconds and click "Accept" Activate a prestep - wait 2 seconds, and click "close" |
Cancel the prestep Don't do anything before step |
Cancels a pre-step and stops it from running in subsequent steps |
Do nothing before all subsequent steps Don't do anything before the next test steps Do not do anything before the next test steps cancel the prestep |
Hiding Secret Test Data
If a step includes a password, PIN number, secret code, credit card number, or a URL with basic authentication, when you save the test, the secret data is stored encrypted on the server and masked in the interface.
Test as it is entered:
Test as it is displayed after saving the test:
XPath Elements
When recording a test in the interactive browser, there may be rare situations where the recorder is unable to assign a clear English name to a screen element. In this case, the recorder will identify the element with its XPath, which may be a long string of code, such as /HTML[1]/BODY[1]/DIV[5]/DIV[1]/MAIN[1]/DIV[2]/DIV[3]/DIV[4]/FIELDSET[1]/DIV[1]/DIV[3]/LABEL[1]
.
This can make the test more difficult to read; however, the test will still run successfully, and regular functionality, such as self-healing, will be applied to the element.
If you need to refer to the element in other steps in the test, you should identify it with the XPath. For example:
Click the "OK button" with the XPath selector "/HTML[1]/BODY[1]/DIV[5]/DIV[1]/MAIN[1]/DIV[2]/DIV[3]/DIV[4]/FIELDSET[1]/DIV[1]/DIV[3]/LABEL[1]"
Advanced Options
A custom flow test can also include the following advanced commands: