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
  • 4,698
  • 10
  • 29
  • 45
muhanryeon
  • 101
  • 1
  • 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
  • 18,946
  • 6
  • 54
  • 66
  • Thank you. It works. :) It would be nice if the appium supports inspect. – muhanryeon 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