Page 1 of 1

How to click a browser extension button?

Posted: Sun Feb 18, 2024 6:44 pm
by Lana_K
Hi,
I've created a task where one of the steps is to open given URL in browser (I use Chrome) and to click on one of the browser extensions to run on this page. For this I tried using Move Mouse to Image or Mouse Move (to position) and then left Mouse Click. Both methods work but neither of the two approaches feels robust enough - if mouse accidentally moves it can interfere with the step or when I set up the task on another computer I have to recalibrate the step.

Is there a better solution to click on an extension button?

Thank you in advance.

Lana

Re: How to click a browser extension button?

Posted: Mon Feb 19, 2024 10:53 am
by Oleg
Move mouse to image action starts the search from the specified coordinates. If the required element is not found, it continues the search process on the entire desktop.
If the element has moved not far from the specified position, the action will find it quite quickly

The main conditions are as follows:
- the element must be visible on the desktop
- the element must match the specified template in the action parameters

You must also specify sufficient tolerance.
The problem is that the system optimizes the images. As a result, the image almost never matches the original 100%.

Re: How to click a browser extension button?

Posted: Mon Feb 19, 2024 11:56 am
by Lana_K
Thank you for the explanation, Oleg. I haven't played with tolerance, I left it at default. Shall I increase it? Would it click something else if the number is too high?
On the computer I used to write the task the whole task works 100%. Then I had to move the task to another computer, where I re-entered the image and its coordinates exactly as I did first time. But on that computer the function is still working hit and miss. Probably because of what you said about system image optimization. I will try changing the tolerance, thank you for the suggestion.

Even when the image is perfectly visible and is at the same location on screen, the task sometimes fails but next run of the same task right after the failure might succeed. So, I thought there might be another way to start an add-on. Maybe there is a piece of software out there which would start a particular extension and which can be run from command line? Or maybe something already exists in Robotask which I can use? Or maybe a piece of code can be inserted into my task?


Lana

Re: How to click a browser extension button?

Posted: Mon Feb 19, 2024 1:22 pm
by Oleg
Unfortunately there are no general guidelines for determining the optimum value of tolerance. You can only do this experimentally.
We forcibly limited the tolerance from 2 to 20 (full range from 0 to 255)
When the tolerance is less than 2, the action almost very often fails to find the required element
When the tolerance is greater than 20, the action is very often wrong and can "find" the wrong thing.

I recommend you to increase the tolerance to 4-5 (maybe a little more) and test the rask.

Re: How to click a browser extension button?

Posted: Tue Feb 20, 2024 5:33 pm
by Lana_K
Thank you for the advice. I set tolerance to 4, as you suggested, and the task seems to be working better. Still tripping over this step once in a while, but now I can call it reliable enough.

Sincerely,
Lana

Re: How to click a browser extension button?

Posted: Fri Mar 15, 2024 10:10 pm
by Lana_K
Hi Oleg, just to let you know about a possible bug.
I was remotely training my colleague to use the task I created for her, which uses 'Move mouse to image' several times. We used 'Select region' button to capture the image from screen for one of the images, everything worked fine. But when we tried to do the same to another image within the same task the 'Select region' button disappeared. Only 'Move' button was left at the bottom of the window and it was not clickable. When we went back to the first image and tried repeating the steps which were working before, the buttons disappeared from there too.
Turned out that she was using external monitors, while I use laptop without external monitors and I have not seen this problem before. When she disconnected her external monitors, the buttons re-appeared and we managed to finish setting up all instances of 'Move mouse to image' in the task for her laptop.
Hope our experience can help.

Re: How to click a browser extension button?

Posted: Sat Mar 16, 2024 8:15 am
by Oleg
Unfortunately I can not reproduce your problem...
Could you send a screenshot with broken window to my email oleg(at)robotask.com?

Re: How to click a browser extension button?

Posted: Tue Mar 19, 2024 12:29 pm
by Lana_K
Because this is not happening on my computer but on my colleague's laptop, and we've already set everything up for her, I have no access to her system to take screenshots. But if in future she experiences the problem again and asks for help, I'll take the screenshots and send them to you. Might take some time though.