Menu

How the iPadOS 27.2 Hide keyboard key broke XCUITest keyboard checks
📰

How the iPadOS 27.2 Hide keyboard key broke XCUITest keyboard checks

DEV Community: swift·Darkø Tasevski·about 18 hours ago
#DdA1LuA3
#devtoswift#devto#dev#keyboard#screen
Long article (1308 words) — no AI summary yet.
Reading 0:00
15s threshold

This is a note about a simulator setting that iPadOS 27.2 turns on by itself, which broke a few UI tests in an iPad reading app I'm working on and, worse, made a bunch of other assertions pass when they shouldn't have. I couldn't find anything written about it, so here it is.

The failing tap

After Xcode 27.2 moved the UI tests to the iOS 27.2 runtime, three tests in a suite that walks an editor sheet with a couple of text fields started failing at the step that dismisses the software keyboard. The helper for that step was the obvious one, find the system key and tap it:

let hideKeyboard = app . keyboards . buttons [ "Hide keyboard" ] . firstMatch XCTAssertTrue ( hideKeyboard . waitForExistence ( timeout : 2 ) ) hideKeyboard . tap ( )

Enter fullscreen mode

Exit fullscreen mode

The tap failed with XCUITest's "failed to scroll to visible" error, and the frame it reported for the key put it at y=1378.5, on an iPad whose screen is 1180 points tall.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.