appium/appium-inspector

bug: The click point does not match the accurate position of the element in latest version(2023.10.4)

yifansue opened this issue ยท 14 comments

Is this an issue specifically with Appium Inspector?

  • I have verified that my issue does not occur with Appium, and should be investigated as an Appium Inspector issue

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

In the latest version Appium-Inspector-mac-2023.10.4.dmg, the click point does not match the accurate position of the icon.
Screen Shot 2023-10-26 at 16 26 08

Expected Behavior

The click point should match the accurate position of the icon.
There is no such problem when using the older version.(for example Appium-Inspector-mac-2023.6.1.dmg)
Screen Shot 2023-10-26 at 16 36 31

Operating System

Mac

Appium Inspector Version

Appium-Inspector-mac-2023.10.4.dmg

Appium Version

2.2.0

Further Information

No response

Thanks for the report. From what I can tell, it seems this happens when the app is launched while the device is in landscape orientation.
For now you can work around this by having the device in portrait orientation before launching the Inspector session. Once the session has been created, you can turn your device to landscape orientation and refresh the screenshot.

Thank you for the reply. The device I'm using can only be in landscape orientation, so I will continue using the older version for now. I look forward to it being fixed in the future.๐Ÿ‘

@yifansue the latest version 2023.11.1 includes a fix for this issue.

@eglitise thanks a lot, but the issue persists from my end.๐Ÿฅน

Screen Shot 2023-11-14 at 10 54 09

Interesting. Could you please provide the following screen size data about your device?

  1. The dimensions detected by UiAutomator2: in the Inspector, switch to Commands tab, open Execute Script -> executeScript, and in the executeScriptCommand field, enter mobile:viewportRect and run it. It should return a set of 4 coordinate points.
  2. The dimensions detected by adb: in the terminal, run adb shell wm size

@eglitise Sure~

  1. mobile:viewportRect
    {
    "left": 0,
    "top": 24,
    "width": 1280,
    "height": 728
    }
  2. adb shell wm size > Physical size: 800x1280

Thanks. These details seem fine, so I'm still unsure of the cause. Could you please also provide the full Appium log from before starting an Inspector session, to after the screenshot has loaded?
You can redact any sensitive information if necessary.

okok, here is the Appium log of start Appium -> start Inspector
appium_log.txt

Thanks for the log. Unfortunately I don't see anything odd here either. Can you perhaps try again with the images plugin disabled?
Also, do you know which was the last Inspector version that was working for you? Maybe 2023.7.1?

hi~

  1. Have tried with the images plugin disabled, but the problem still persists.
  2. Yes, very correct! The latest version that was working for me is 2023.7.1.

@yifansue I've identified one issue that could be related to your problem. Just to confirm, after you've created an Inspector session, if you then press the refresh button, do the highlighter positions change?

hi @eglitise the highlighter positions do not change after pressing the refresh button.

@yifansue I believe I finally managed to reproduce your issue and fixed the problem. This fix is included in the latest version (2023.12.2). Please let me know if it helps ๐Ÿ™

@eglitise it works!!! ๐Ÿฅณ๐Ÿฅณ๐Ÿฅณ cooooooooool~~~~~ Thank you so much! โค๏ธ