[ad_1]
My UI check situation is straightforward. Change system language in settings app and open my check app to test if the language in app is modified accordingly. And I might test about 5 languages in order that contain switching between check app and settings app.
The issue is that after I utilized the language change in system settings, the check is stopped. It exhibits “Message from debugger: Terminated because of sign 9” in console, I believe meaning my app was terminated by some trigger.
So is {that a} appropriate habits? Whether it is, how may I test check app’s language after altering the system language?
Right here is an instance concerning the check case:
func testExample() throws {
// 1. lauch settingsApp
let settingsApp = XCUIApplication(bundleIdentifier: "com.apple.Preferences")
settingsApp.launch()
// 2. change system language in settingsAPP and apply the change
// MARK: App was terminated: Message from debugger: Terminated because of sign 9
// 3. launch my app to test if language was modified accordingly
let app = XCUIApplication()
app.launch()
}
[ad_2]

