[Solved] XClick moves mouse to incorrect position

I am using the XClick command on the Chrome browser extension on the Google homepage to navigate to the images tab. I uploaded the following image of where I want to click:

Images
And the following code correctly identifies the location of the Images button:

{
  "Command": "open",
  "Target": "https://www.google.com/",
  "Value": ""
},
{
  "Command": "XClick",
  "Target": "Images.png@0.5",
  "Value": ""
}

The problem is that is moves the mouse to the incorrect position:
MouseLocation

As you can see in the above image, the correct button location is identified, but instead of moving the mouse to it, the mouse is moved to the top left corner of the web page.

As much as I would like to have a solution for you, Kantu does not currently support dual monitors. I believe this issue is being worked on. However, we have not heard much on it for a while.

Link to the bug report: [issue #41] XClick fails if second monitor is connected

So I switched over to using a single monitor and it still misses, just now it is up and to the right rather than the left.

Is the screen you switched to smaller than the screen you recorded the script on? Because the script may be trying to click at the coordinates that you set on the other screen which could be different from the coordinates on your new screen.

So I didn’t hard code in coordinates since I was under the impression that when you pass an image to XClick it will set the correct coordinates. That being said, I used the same monitor to take a screenshot as I used to run the test.

Have you used the green anchor image box, looking back at your image I could not see it?

If you haven’t, I would suggest using the Google logo or your Grey T.

Also, I assume the google images click is an example but if it is not, why don’ you just click on and record clicking the link?

I have been doing some testing and I cannot get it to work even with XclickRelative or Xclick Text search (ocr=text to click) on the main google site.

I was, however, able to get OCR (“Command”: “XClick”, “Target”: “ocr=Images”, “Value”: “”) to work on a random google search and click the other google images button, so you could also try and see if it was just googles home page?

I hope these suggestions help.

I haven’t tried using the green anchor image box. What would be the point of that? The program doesn’t have a problem identifying the correct location (it perfectly creates a red box around where I want to click). The problem is that the mouse isn’t moved inside the correctly located image.

And yes, the Google images click is just an example since my personal site isn’t public. I tried switching away from the Google homepage and ran my code on a random Google search page, but I still had the same issue where the mouse isn’t moved to the location that was identified.

“Commands”: [
{
“Command”: “open”,
“Target”: “kantu is cool - Google Search”,
“Value”: “”
},
{
“Command”: “XClick”,
“Target”: “Images.png@0.5”,
“Value”: “”
}
]

This is the script that succeeded:

{
  "Command": "open",
  "Target": "https://www.google.com/search?q=I%20agree%20",
  "Value": ""
},
{
  "Command": "XClick",
  "Target": "iie0h6_dpi_108.png",
  "Value": ""

Kantu%20Xclick%20test
I didn’t designate a confidence level, but I did in my settings (Cog | Vision | Confidence level) (I believe that I set the Confidence level to 0.4 for this test)

This is a bug. There are other threads where users have this same issue (I am one of them). I have tried resetting the zoom level, removing all other extensions, reinstalling, and turning off GPU acceleration and I haven’t been able to figure out a cause.
The locators and images are found correctly but the click is executed in the wrong location. The only workaround I have come up with is to use a different locator method or put in a fake x,y where you need it to be.

1 Like

When you say use a different locator method do you mean a method that isn’t visual?
Also what do you mean by fake x,y? Does that just mean figure out the coordinates the click location should be at and hard code them in?

Right, so you can use clickAndWait | link=Images
As for the x,y that’s exactly what I had to do… keep adjusting them until it clicked on the target.

What systems do you know Kantu will work on and won’t work on? I am using Windows 10 on a laptop with an i5 and an integrated intel graphics card

I don’t think it’s been determined yet as it seems to fail on very few systems and they’re all different. I’m on an AMD processor desktop, W10, Chrome.

If anyone thinks she/he can recreate the issue on our test systems, please contact us.

In our tests all works fine.

I also have this problem. It does work on some pages and others don’t. On my computer, the google scripts work perfect but I tried on our app and Facebook and had the same problem on Xclick. Another peer has the same code, the same computer also only using one screen the same version and it does works on them and for me, it does not work. I tried to re-create the issue but the problem is the code works. Looks like it does not work on some computers by the look at it.

Hi. A related issue is encountered.
Details here: XClick Green screen

Hi everyone
I have this same problem after actualization to 5.5.7. I’m used two monitors with different resolution
If I run UI.Vision on the same screen where run macros all it’s ok.
If I run macro on two monitors XClik is decalibrating

Site: Browser Mouse Event Test Page

I’m used two monitors with different resolution

Dual monitors are not yet supported. Please see

I am seeing the same issue after 5.5.7 update, the locator finds the target but the mouse points to an incorrect spot. Happening in desktop and browser mode. Was working properly before the update

1 Like

@JB_Smith Interesting. Is this in Windows, Mac or Linux?