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

fix: iOS 13.1 touch coordinates calculation in landscape mode #220

Merged
merged 1 commit into from
Sep 19, 2019
Merged

fix: iOS 13.1 touch coordinates calculation in landscape mode #220

merged 1 commit into from
Sep 19, 2019

Conversation

Dan-Maor
Copy link
Collaborator

It appears as if in iOS 13.1 the frame.size property of XCUIApplication is now returned in accordance to the orientation of the UI, as opposed to previously where it was always returned in a portrait orientation, causing FBInvertPointForApplication to return incorrect touch coordinates when the UI is in landscape (either states).

The logic of the function remains the same, however now the needed dimension is used when calculating the new point:

  • Using the larger of the two screen dimensions for calculating the Y coordinate while in UIInterfaceOrientationLandscapeLeft.
  • Using the smaller of the two screen dimensions for calculating the X coordinate while in UIInterfaceOrientationLandscapeRight.

@mykola-mokhnach
Copy link

oh, how many Xcode releases they needed at Apple to address it...

@Dan-Maor
Copy link
Collaborator Author

The change appears to be on the device side actually, iOS 13.0 still behaves in the same manner as before.

@mykola-mokhnach mykola-mokhnach merged commit 49979a9 into appium:master Sep 19, 2019
@Dan-Maor Dan-Maor deleted the landscapeTouchIos131 branch September 29, 2019 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants