Certification: AI-driven Test Automation
Clicks
This is a base command. In this section we will explore different types of clicks that you can use in testRigor
enter "doll" into "search"
click "search"
testRigor is smart enough to understand that the first “search” refers to an input whereas the second one refers to a button.
Note: All parameters of all commands by default are case insensitive and will find the element even if they match partially
click "search"
click "Search"
click "a"
tap "a"
You could use clicks to do taps if you’d like to reuse the same steps across web and mobile applications
Clicks with relative location
click "Read The Story" to the left of "Release Manager – Edcast"

click "chrome" in the context of "Pixel 3XL"
click on "All" to the left of "Best sellers"
click on the button "Best Sellers" to the right of the button "All"
Clicking with a mouse vs. using JavaScript
The default mode is JavaScript
Note: in headless mode, clicking with JavaScript becomes the only option. If your test cases require clicking via mouse, use regular (non-headless) mode.
Clicks by index
As a rule of thumb, it’s always better to use relative locations other than indexes. However, in some cases, indexes might be necessary.
click on the 3rd "Add to cart"
click on the second "Add to Cart" within the context of "Section 1"
click on 1st "Add to cart"
is not the same as click "Add to cart"
This is because all elements have different priorities. testRigor uses OCR (Object Character Recognition) feature and assigns priorities to all elements. For example, if there are 3 “Add to cart” buttons on the page, and you scroll down to the end of the page where only the third “Add to cart” is visible – testRigor will assign the highest priority to this button.
Q: For the example above, what are 2 ways to make testRigor click on the “Add to cart” button?
Drags
drag "text1" onto "text2"
drag file "<URL>" onto "element"
drag file from saved value "File to upload" onto "element"
drag folder from saved value "Zipped Folder" onto "element"
drag "text1" into "text2" with the mouse
drag "link to file" into "droppable file section"
Alternatively, you can specify everything done with the mouse in the settings section. Settings > Advanced > in the Desktop Web Fine Tuning section How to process clicks > Use OS Mouse
Middle clicks and double clicks
middle click on the 3rd "hello"
Note: you can use middle clicks to open a link in a new tab
double click on "username"
Right clicks
right click on "filename"
Note: depending on where you click, the action may trigger a specific application UI or it might initiate built-in browser commands, just as when using a regular mouse.
Clicks with an offset
click on "Delete" with offset "20,10"
The offset is calculated from the top left corner of the element, horizontal coordinate first.
Offsets can also be used with other commands, such as drag, zoom in and zoom out, pinch open and pinch close.
drag "canvas1" with offset "0,0" to "canvas1" with offset "50,0" via "canvas1" with offset "0,50" through "canvas1" with offset "50,50"
Hover
You can use a hover command in testRigor the same way as when using a regular mouse. Use it to trigger specific UI actions where needed.
hover over "Account & Lists"
click "My account"