My XCUI test was checking for existence of notification by using springBoardApp.descendants(matching: .any)["NotificationShortLookView"]. But I have started getting "Leave On" and "Turn off" buttons in it. With this above code is failing to get a handle to the notification.

My test is to verify notification in focus mode. So I can't disable it.

I tired to use below code to access "Leave On" button and then click. But that's not working let notification = springBoardApp.otherElements["Notification"].descendants(matching: .any)["Leave On"]

Expectation: Once I click on "Leave On" button successfully, I should be able to access notification and long press on notification to expand it for details

0

There are 0 answers