Missing Button Elements on iOS 18 Select Contacts Screen in XCTest

While using XCTest with Appium Inspector for iOS 18 on the "Select Contacts" screen, I expected XCTest to identify XCUIElement references for both the "Allow All Access" and "Select Contacts" buttons. However, neither element was found in the results and also there is no reference to any text in screen.

Feedback Assistant tag = FB14622782

Thank you for filing a Feedback report. I am following it up.

I suspect that the app/process being inspected by Appium is not the correct one. It seems that the Contacts process that creates this UI would need to be queried. I am not sure how Appium decides which app to use as the application to inspect (under the hood, its an XCUIApplication), but you would need to be looking at the Contacts process to examine the UI elements there. It seems like Appium is inspecting SpringBoard, potentially.

I found solution. Try to reach button in XCUIApplication(bundleIdentifier: "com.apple.ContactsUI.LimitedAccessPromptView")

Missing Button Elements on iOS 18 Select Contacts Screen in XCTest
 
 
Q