How to use XClickText and XClickTextRelative?

From our daily Enterprise tech support work: Here is a nice example of how to XClickTextRelative can be a more stable replacement for XClick if the images to find are small and not very unique.

In this example, the first approach was to use

XClick | gps

to click the GPS icon. However, all icons on this website are small and very similar (small blue buttons with some white symbol inside). So when moving between different machines and screen resolutions, sometimes the wrong icon was selected.

The solution was to replace XClick with XClickTextRelative. Now detect the word “GPS-Position” with OCR, and then click on the icon to the right of it. The screenshots explain this:

XClick Solution for GPS icon click:

XClickTextRelative Solution for GPS icon click:

1 Like