.isDisabled()
Retrieves disabled status of element. Please note that this is based on the accessibility state (React Native, Android, iOS) of the element. While the element may appear disabled, this may not be the case to Appium.
Usage
element(matcher).isDisabled()
Returns
Promise
(Boolean
): Element disabled status.
Support
Platform | Supported |
---|---|
iOS | Yes |
Android | Yes |
Web | Yes |
Examples
Disabled status of text input:
const { element, by, expect } = require("appdriver");
(async () => {
const disabled = await element(by.label("text-input"))
.isDisabled();
return expect(disabled).toBeTruthy();
})();