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

Incorrect element locations on iOS 18.1 Simulator #2138

Open
1 task done
BrandonYuen opened this issue Nov 13, 2024 · 2 comments
Open
1 task done

Incorrect element locations on iOS 18.1 Simulator #2138

BrandonYuen opened this issue Nov 13, 2024 · 2 comments
Labels

Comments

@BrandonYuen
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and didn't find mine.

Steps to reproduce

  1. Spin up a 18.1 iPhone 16 Pro Simulator
  2. maestro studio

Actual results

tapOn doesn't work so I investigated with maestro studio and as you can see below, the element locations (boxes) are incorrect.
Screenshot 2024-11-12 at 16 41 36
Screenshot 2024-11-12 at 16 41 46

Expected results

Locations (boxes) of elements should be correct.
As a fix I downloaded and installed a iOS 16.4 Simulator which does not have this issue. It's the same exact code and context, just swapped the simulator.

About app

Closed source

About environment

Macbook m4, iOS simulator 18.1

Logs

No response

Maestro version

1.39.1

How did you install Maestro?

install script (https://get.maestro.mobile.dev)

Anything else?

No response

Copy link

linear bot commented Nov 13, 2024

@herval herval added the Maestro label Nov 27, 2024 — with Linear
@vinaykumar0339
Copy link

@BrandonYuen, we also encountered this issue, and it doesn't seem to be tied to the OS version. We experienced it even on iOS 16 while working with a React Native application. Interestingly, the correct coordinates are returned when using simulators like the iPhone SE with a fingerprint touch (HOME button).

It would be helpful if the Maestro team could investigate this to ensure compatibility across all simulator types.

After debugging the Maestro iOS driver, I found that the issue stems from the following code, which returns incorrect element coordinates:

let snapshotDictionary = try xcuiElement.snapshot().dictionaryRepresentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants