Clicking using Computer Vision

@WilfredNg

You can use CV text property in the click activity to identify the required text only by passing a variable there and assumption is variable contains required value

cheers

that was I’m already doing. It seems to be working to a certain extend. I’m trying to prevent it from misclicking. It seems to misclick if the correct element isn’t on the screen. It should throw an exception.

If the correct element is on the screen, there isn’t any issues.

@WilfredNg

CV Text works like contains so if you give text as 123 and if there is 1234 then it wouls still clcika s 1234 has 123

better alternative would be to use a get text before click and compare the full text with the text you want and then finalize if you want to click or not …this way you can avoid few more misclickings

cheers

How will i be able to do that given a list of text?

@WilfredNg

You are passing a variable or single text in cv text field right…similarly use get cv text activity and get the text it sees and save it in variable say str1

now you can use if condition to check str.equals(str1)…on then side use click to perform click and on else side use nothing as it is not matched

cheers

I’m currently encountering errors were using CV text the numbers/text are too similar… it will throw an error that multiple similar matches are found

@WilfredNg

Even in computer vision …we get a cv descriptor…try to modify the descriptor and add variable in palce of the text you want to find and then click it …that way it might be unique

Here is an example

Cheers