4 Replies
      Latest reply on Jan 28, 2020 1:15 PM by RCP
      cemarch Level 1 Level 1 (0 points)



        Since Xcode 11, getting value from a UISwitch in Settings app with XCUITest is not working anymore with iOS 12 devices.

        For example, going on the Notification settings, I would like to check some switch values.


                    let switchSounds = settingsApp.switches["Sounds"]
                    let expectedValue = isEnabled ? "1" : "0"
                    XCTAssert(switchSounds.value as? String == expectedValue)


        The switchSounds is found but its value is nil. It was working before and it still works on the app I run my other tests on.


        Is there any workaround I can use ? I tried using isSelected but it's not working either.