0 Replies
      Latest reply on Jun 21, 2019 12:07 PM by cdisderoAtTibco
      cdisderoAtTibco Level 1 Level 1 (0 points)

        Greetings!  I have an app written in Objective C which uses an UIAlertController to present a popover on a toolbar button in the app.  In this alert there are two UIAlertAction, one is of style UIAlertActionStyleCancel, and the other is of style UIAlertActionStyleDestructive with the text "Close analysis".


        The code, built with the latest beta of Xcode 11, works just fine in iOS 13 simulator when running the app normally.  However when I try to use XCUITest to test this alert, this code which previously worked, now no longer finds the destructive action button in the alert:


                app.sheets.buttons["Close analysis"].tap()


        In fact, in iOS 13 simulator, app.sheets.count returns 0.  If I try to use the recorder to record tapping on this action in the alert, I get an error in Xcode 11:


        Timestamped Event Matching Error: Failed to find matching element


        How does one go about testing UIAlertController in the latest XCUITest framework?