UI testing Automation

I want to automate my ui testing. My app redirects the user to the (iPhone) Settings app, then the user needs to modify the some settings, and then the user needs to return to the app.

Automating the first part is easy. Is it even possible to do the Settings part?

Thanks

Replies

Hello!

It is possible to automate Settings using XCUITest- just initialize an XCUIApplication with the bundle id of the Settings app- which is currently com.apple.Preferences

List of Apple bundle IDs:

https://support.apple.com/guide/deployment/bundle-ids-for-native-ios-and-ipados-apps-depece748c41/web

Example code:

XCUIApplication(bundleIdentifier: "com.apple.Preferences")

https://developer.apple.com/documentation/xctest/xcuiapplication/2879415-init

Then automate that app the same way you would do for one that you built.