question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clicks on elements don't work properly on iPad and iPhone 10.0+ in landscape mode

See original GitHub issue

The problem

Triggering WebElement->click method on iPad 10.0 simulator in landscape mode does work properly and always clicks at wrong location. At the same time it works as expected in portrait mode.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.6.0 @ XCUITest
  • Last Appium version that did not exhibit the issue (if applicable):
  • Desktop OS/version used to run Appium: 10.11
  • Node.js version (unless using Appium.app|exe): 5.4.1
  • Mobile platform/version under test: iOS 10.0
  • Real device or emulator/simulator: iPad Air Simulator
  • Appium CLI or Appium.app|exe: CLI

Details

This is, most likely, bug in XCTest framework itself and I have already reported it to Apple bugtracker, but, probably, we can introduce a workaround or add it to the official documentation as known issue. Although, the described problem is not reproducible in iPad simulator 9.3. It only started to fail after I upgraded Xcode to version 8.0. It looks like XCTest always assumes we are in portrait mode and calculates wrong coordinates for clicking. I’ve tried to directly call WDA methods like setOrientation and setRotation, but neither of them helps to workaround the problem. Reference to the other known issue: https://github.com/facebook/WebDriverAgent/issues/300

Code To Reproduce Issue [ Good To Have ]

driver.rotate(ScreenOrientation.LANDSCAPE);
WebElement el = driver.getElement(locator);
el.click()

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:39 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
imurchiecommented, Nov 18, 2016

We are eagerly awaiting a fix too. Apple is aware of the problem.

2reactions
imurchiecommented, Feb 1, 2017

@maesiva You need to install it within the Appium installation for it to work. Or you can re-install the whole thing with npm uninstall -g appium && npm install -g appium --no-shrinkwrap.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rotate the screen on your iPad - Apple Support
The screen on your iPad can rotate so that you can see apps like Safari and Messages in portrait or landscape mode. Learn...
Read more >
Safari IOS Having clickable elements at top of screen doesn't ...
The workaround I did is detecting when the app gets out of fullscreen by comparing the screen.height with the screen.
Read more >
The most common Apple iPad problems, and how to fix them
A recent example of this happened in June 2020, when a version of iPad iOS caused iPads to bootloop unexpectedly while working, usually...
Read more >
Can't Select “Option” On Guided Access After Upgrading to ...
I tried it on the regular YouTube app and it did present the same problem however after I switched the orientation from landscape...
Read more >
iPad Pro Touch Screen Unresponsive Randomly? Try These ...
Before doing anything else, clean the iPad Pro screen. Press the screen lock button so that you don't accidentally tap on anything you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found