I want to click on an image targeting it with XY offset

Hello

I am currently developing using StudioX 2024.10.14 LTS on Win10.
This is a legacy project. The UIAutomation package is v25.10.33.

I want to click on an image using an XY offset as the target.

When I consulted Chat-GPT, I received the following response, but I still wasn’t sure about the steps to specify the XY offset.
If someone could teach me through the screen transition, I would appreciate it.

:white_check_mark: Current Recommended Method
Method ① Use “Click” Activity + Image Anchor
Place the “Click” activity
In Target settings, select “Image” as the targeting method
Set XY Offset in the offset field.

Hi @gorby

The XY offset is quite a cool feature and actually easy to implement.

All it does is allow you to specify how many pixels you want to offset from the center of your target when you select it. You can test it yourself by saying “200” in the X and “-200” in the Y just to understand it.

Alternatively, check this thread and video:

Basically the video is showing us how you can manipulate the target when you actually set it from the beginning, and from there, it gives you the new offset XY position automatically - and then you can play around with it yourself to get the ideal image target.

So ChatGPT was half correct - do this (quoting your message):

:white_check_mark: Current Recommended Method

  1. Method① Use “Click” Activity + Image Anchor
  2. Place the 「Click」 activity (except now what I would do here is target the image, but then move the offset yourself to the ideal position as shown in the video).
  3. In Target settings, select 「Image」 as the targeting method
  4. Confirm/Set XY Offset in the offset field

This is an example of my new offset XY target that I moved when creating it:

Hi @gorby

As suggested by chatgpt you can follow that porcess. to get the knowledge about the image transition refer the below documentation