UIAButton Enabled/Disabled always true

Hi all,

Has anyone had issues with UIAButton states for the enabled property?

The buttons in question have both …

.enabled = false
.userInteractionEnabled = false

set in the Xcode project but Appium will always return back true, am I assuming the property maps to the enabled property of the control incorrectly?

Thanks

check also in pagesource the difference when enabled and disabled.

driver.getPageSource()

if found the difference in some attribute - use it.

Will take a look, I know when I looked at the page source the enabled property was always the same.

check ALL attributes

Just done a compare between the two with no differences, however both the inspector in Xcode and Reveal show the button as been disabled.

aaaaa iOS! was thought that Android.

for iOS either yourself or ask developer to change attribute when changing UIAButton state e.g. “accessibilityValue”.

Thanks, and yes IOS mentioned Xcode above.

And yes I know the accessibilityValue can be used instead but that should really be the value of the control, Again I can use the label e.g “Disabled XButton” or “Enabled XButton”, but if at all possible it would be best to use the disabled property from Appium if this works.

Thanks for help so far :slight_smile: