3

enter image description here

I tried using the following to push the OK button, but it does not work. await element (by.text ('Hello')). tap ();

https://github.com/wix/detox/blob/master/docs/ There is a note, but it does not seem to be about how to control the system pop-up window.

If you know, please let me know.

Tom Aranda
  • 5,919
  • 11
  • 35
  • 51
OM62DwC76p
  • 121
  • 2
  • 9

1 Answers1

5

I have been able to do the following to tap on a native iOS alert.

await element(by.label('OK').and(by.type('_UIAlertControllerActionView'))).tap();

I got the solution from here Detox: iOS Simulator how to confirm alert message

Andrew
  • 26,706
  • 9
  • 85
  • 101
  • Thank you. It works. :) It would be nice if the appium supports inspect. – OM62DwC76p Jul 03 '18 at 01:40
  • Is there anyway to find out the UI element Types using Detox Expo? – srikanth Jul 03 '18 at 17:21
  • @srikanth I don't think you can attach the hierarchy debugger to an Expo app. I maybe wrong, but I don't work with Expo so I cannot speak intelligently about it. – Andrew Jul 18 '18 at 20:08