XClick always misses with a horizontal offset

Whenever I try using XClick it correctly identifies the image of where I want it to click and then always clicks to the left of the correct spot.
I tried XClickRelative as well and it seemed to show similar behaviour.

Hi, can you please post a short screen video of this issue? Also, is the browser zoom at 100%?

Test: If you use XClickText - does this click on the correct word?

@admin
What kind of command is XClickText in firefox is not shown to me in the list of available commands

xClickText is an improved version of the existing XClick | ocr=Text

This command (like all new features) is currently only available in Chrome and Edge.

The good news is that Firefox is finally starting manifest V3 support, so we can resume our UI.Vision for Firefox updates in the near future. We will do this as soon as Firefox has full Manifest V3 support.

1 Like

Hi,

XClickText doesn’t seem to work at all for me.
Zoom in the browser is definitely at 100%.

I took a 5s clip but I can’t upload it as I get the error “Sorry, new users can not upload attachments”.
I’ve included a screenshot

I’ve put screenshots down below for now to show what the command is trying to do.
I need to use an XClick of some kind to click on the day part of the date field and then enter the value.
The reason I need to do it this way is that this is the second date field on the page and so there aren’t any elements I can lock onto with the normal click function.

The XClickRelative command:

The screenshot setup:
image

The result:
image

To give some further context - the script is to fill out a form which includes two date fields. Using the click command results in the id defaulting to something that changes everytime the form opens, so it can’t be used because it’s inconsistent. Helpfully though they include a data automation id which can be used which stays constant.

The problem is that it’s constant within the page as well so I can correctly enter data into the first date field but I can’t identify the second date field with this function - instead I have to use one of the XClick variants (I think XClickRelative is most suitable).

Thanks in advance,
PJ

I can upload videos now so here it is for reference:

Thanks for the useful screenshots and video. I see the XClick offset in the video:

  • It seems your browser is full screen? Try running the macro/browser in “not full screen” => Does it work then?

  • If this fails, the option that works for sure is to switch to desktop automation mode: Just add XDesktopAutomation | true to your macro. This avoids the browser x/y calibration, which - for some reason that I am not sure of yet - fails at the moment on your machine for the “x” value.

  • Another possible workaround: Instead of XClickRelative, you might be able to click in another box above and then use XType | ${KEY_TAB} to tab to/into the date field.

This is exactly what I meant, that Xclick is making browsers animations less reliable. I had the same issue where my browser was set to 100% and it still would not hit the target. It took me a week to find out what was going on and I hope that issue applies to you to:
Make sure the kantu browser where you have all your scripts stored is also set to 100%. I must have had it changed by accident and did not even know it had anything like a zoom setting.

The browser isn’t full screen, it’s just a normal maximised window.

I’ve played around a bit more and it seems to be because I have multiple screens that I’m extending my display to. The XDesktopAutomation command doesn’t work at all either. The XClickRelative works but just has the offset, when I use Desktop Automation it doesn’t do anything - it just times out.
The XClickRelative works with and without the Desktop command.

Unless I’m using the XDesktopAutomation incorrectly:

The third workaround doesn’t work with the multiple screens, none of the XClick commands work so I can’t then XType-Tab to the correct field (though I do like this idea!).
To my knowledge I can’t command the regular click command with XType - unless I’m misunderstanding this.

For now this means that I can proceed with what I need this program by just unplugging from the screens when I run it for real.

I’d really like to be able to use this with my multiple screens, I’d be surprised if I’m the only one in this situation so I’m happy to work with you guys if you want to figure out why the commands aren’t working with my particular setup.

Cheers,
PJ

Thanks noahhath,

I checked this and my zoom is also set to normal.
As noted in my other comment, it seems the problem is due to my use of multiple screens.

Cheers,
PJ

Yes, that could be it. Having said that, it should work fine, multiple screens are supported.

Are you on the main screen? Desktop automation only works for screen #1 (we are working on expanding this, but right now, it automates only the main screen).

Are you on Windows, Mac or Linux?

Too bad, I was really hoping that was the issue. I use multiple screens without issues.

This totally fixed the problem I’ve had for a couple of months now. Thank you!