3

I am trying to write a test to automate the showing and hiding of the UI keyboard. However, I need to make sure that the keyboard is visible on the screen whenever I try to make such a call. I found that I can check for an element of the UIRemoteKeyboardWindow class to do so, but how do I get EarlGrey to match it since there's no direct unique matcher for it. Is there any way with EarlGrey by which you can match on these internal elements?

Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900
gran_profaci
  • 8,087
  • 15
  • 66
  • 99

1 Answers1

2

From the FAQ:

How do I create a matcher that matches internal UIKit classes?

Use NSClassFromString to match on internal classes that can't be referenced directly.

grey_kindOfClass(NSClassFromString("_UIAlertControllerView"))

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139