Runner API
Local runner API
To check the runner's local API you first need to check if you have visual automation enabled and on what port.
Once you are sure, you need to go to this address in your browser http://localhost:7777/api/v1/openapi.json.
If you have visual automation enabled on a port other than the primary 7777 you must change the port in the link
Debug
Enables or disables debug overlay. Example visualization for visual automation looking for chrome icon.
# Request
PUT http://localhost:7777/api/v1/debug
Parameters:
"enable": true, #enable/disable overlay
"time": 5 #number of seconds for which the overlay is to be visible
# Response
200 OKClick
It is used to click around the screen and comes in several flavors. For the sake of order, let's have the coordinate system as we count in case there is any doubt - from the lower left corner of a given screen.

By coordinates
The application clicks in the given coordinates on the screen.
By image
The application finds something that looks like the substituted image. Click on the "center" of the found image.
By text
The application finds text on the screen and then clicks it.
Hover
Moves the cursor to the specified coordinates.
Type
Simulates pressing keys on a keyboard.
The keys parameter contains the sequence of keys pressed. Type simulates pressing real keys, which, unlike pasting text, allows you to use keyboard shortcuts native to your system such as Alt+F4 or CTRL+V.
Keys are pressed at 50ms intervals to faithfully replicate the way you type on a keyboard without the risk of generating an unpredictable situation in a text field. When pasting a value into a text field, many editors behave differently (a single event) than when there are dozens of key press events (a multi-event of changing the contents of a text field).
Modifier keys are so-called sticky keys (alt, win, control, altgr, shift). When executing a sequence, put the key codes in [].
Examples:
Pressing
ctrl+ccombination =>keys"[control][c]"Pressing
alt+f4combination =>keys="[alt][f4]"Press
ctrl+l(go to browser bar), then type the address and press Enter =>[control][l]www.cloudflare.com[enter]Pressing
ctrl+land typinghttp://www.w3schools.com/HTML/tryit.asp?filename=tryhtml5_draganddropin the browser bar and pressing Enter =>[CONTROL][L]https[shift][;]//www.w3schools.com/[shift][h][shift][t][shift][M][shift][L]/tryit.asp[shift][?]filename=tryhtml5[shift][-]draganddrop[enter]Maximize window with
winkey and up arrow =>keys="[win][up]"
The key support catalog is expandable. The currently available keys can be seen in the screenshot below. In addition to the special keys, the characters 0-9 and A-Z are supported as standard.

Ocr
OCR has two options, the first is Find which finds the coordinates of the text you are looking for, and Get which retrieves the entire text from the screen.
Find
Find (text coordinates) on the screen.
Get
Download all the text from the screen.
Visual automation
Finding a picture.
Drag and drop
Screenshot
Downloads a PNG with a screenshot of the selected monitor.
Developer guides
Finding by image
When searching for an image (visual find) or click image (click image) to search for, it is crucial to prepare the master image correctly.
The quality of the results and the ability to match are closely linked to the size of the reference image. Pay attention to the DPI of the monitor on which the image will be searched. If the monitor operates at a high DPI (high pixel density) the search using a low DPI image will fail. The same will not work in the opposite direction.
For example, let's take a search or click on the ruby icon on the Just Join IT website.

This requires the preparation of a master image of the selected icon.


If the reference icon contains margins that are too large, the icon search will start returning a match on almost every round icon located in the icon bar on the page. This happens because of the matching area. Percentage-wise, the white margin and "roundness" of the symbol becomes more important than the actual icon inside. Proper preparation of the icon even gives a 100% (1.0 certainty) match.
Last updated