Xclick and visualSearch #1 is not the first left to rigth and top to bottom

prueba

I have a list where I have to mark the first item called “MULTA”. XClick should mark the first item from left to right and top to bottom. But it does not do this. I have tried with visualSearch and # 1 is also not the first one on the left and top.
Is there a way to know if it is the top item?

Attached an example image.

Thanks and sorry my english

This is a very good question. The answer is that it depends whether or not you add #1 (or #2, #3,…) to your image name:

  • Without #1 (e.g. XClick | image.png) UIVision sorts after best match. So if the 3rd checkbox in this list happen to be a slightly better match than the others, it will be number 1 in the order.

  • With #1 added (e.g. XClick | image.png#1) UIVision treats all matches above the confidence level as equal. It sorts as top/left to bottom/right. So if the 3rd checkbox in this list happen to be a slightly better match than the others, it will still be number 3 in the order. So this is what you need.

See this video:

Screenshot from video:

Another approach for this task is to use XClickRelative with e. g. an input image like shown below. Here it finds the word “MULTA” and then clicks the box to the left of it.

image

PS: But because there are two “MULTA” in the table, make sure to add #1 here, too. This way it will take the first one and not the best match:

Great job, now work fine. I was just using XClickRelative.

I tried using visionLimitSearchArea and I wonder how to remove the restriction

I wonder how to remove the restriction

You mean you want to undo the limits set by visionLimitSearchArea?

Web browser automation:

  • visionLimitSearchArea | viewport (= search browser viewport, this is the default)

  • visionLimitSearchArea | full (= search the full web page, even below the fold!)

These are the same differences as captureScreenshot vs captureEntirePageScreenshot.

Desktop automation:

  • visionLimitSearchArea | full (= search the complete desktop, this is the default)