isEnabled

Return true or false if the selected DOM-element found by given selector is enabled.

Usage

1
client.isEnabled(selector).then(callback);

Parameters

Param Type Details
selector String DOM-element

Example

index.html
1
2
3
<input type="text" name="inputField" class="input1">
<input type="text" name="inputField" class="input2" disabled>
<input type="text" name="inputField" class="input3" disabled="disabled">
isEnabled.js
1
2
3
4
5
6
7
8
9
10
client
.isEnabled('.input1').then(function(isEnabled) {
console.log(isEnabled); // outputs: true
})
.isEnabled('.input2').then(function(isEnabled) {
console.log(isEnabled); // outputs: false
})
.isEnabled('.input3').then(function(isEnabled) {
console.log(isEnabled); // outputs: false
})

Uses