4

The Discoverability overlay displays the available UIKeyCommands when a user connects a hardware keyboard to an iOS device.

A user launches the overlay by holding down the Command key.

XCUITests provide a high-level API to blackbox test your app, by allowing you to query the view hierarchy and perform actions upon those views.

For localization and screenshot purposes, I wish to be able to launch the Discoverability overlay from a XCUITestCase.

Discverability overlay

Unfortunately, XCUIKeyModifierFlags is macOS only.

UIDevice.press is only for on-device hardware buttons.

What am I missing?

How do I launch the Discoverability overlay from an XCUITestCase?

At a stretch, I can add something in the application code, but then how do I launch it from the application?

jamesh
  • 19,863
  • 14
  • 56
  • 96

0 Answers0