Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find Coordinates are wrong for MacOS when using a resolution other than default. #51

Open
hhslepicka opened this issue May 24, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@hhslepicka
Copy link
Collaborator

Describe the bug
On MacOS, if using a resolution different than default the find command works properly but the coordinates are wrong as they are calculated based on the default screen resolution and not the one currently in use.

Expected behavior
Find works and the coordinates are adjusted to the user's selected monitor resolution.

Steps to Reproduce

  • Configure the resolution to be different than the default for the display
  • Perform a find
  • Move the mouse to the element center
  • Observe that it won't be in the proper location

Possible Solution

My Platform

  • MacOS
  • Display with 4K resolution
  • System set up to half of the display capable resolution

Additional context

$ system_profiler SPDisplaysDataType
Graphics/Displays:

    Apple M2 Pro:

      Chipset Model: Apple M2 Pro
      Type: GPU
      Bus: Built-In
      Total Number of Cores: 19
      Vendor: Apple (0x106b)
      Metal Support: Metal 3
      Displays:
        DELL P2715Q:
          Resolution: 3840 x 2160 (2160p/4K UHD 1 - Ultra High Definition)
          UI Looks like: 1920 x 1080 @ 30.00Hz
          Main Display: Yes
          Mirror: Off
          Online: Yes
          Rotation: Supported
(temp) $ python -c "from botcity.core import DesktopBot; bot = DesktopBot(); print(bot.get_screenshot().size)"
(3840, 2160)
@hhslepicka hhslepicka added the bug Something isn't working label May 24, 2024
@hhslepicka hhslepicka self-assigned this May 24, 2024
@hhslepicka
Copy link
Collaborator Author

Note: be careful when fix this to not make the bot.display_size() wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant