Validate android.widget.Switch and XCUIElementTypeSwitch state

From Appium Inspector I get the type of the element to be android.widget.Switch for Android and XCUIElementTypeSwitch for iOS. I couldn’t find a way to get the switch state though, and I need to check if the switch is enabled or not.

Is there any way around this? I am using Appium 2.0.0-beta.57 and drivers UIAutomator2 (2.12.2) and XCUITest (4.16.10)

Actually, I only had to refresh the Inspector by clicking again on the element. I can see the checked attribute for Android and the value attribute for iOS

1 Like