.isEnabled() Suggest edits
Since: 3.5.0Determines if an element is enabled.
For more info on working with DOM elements in Nightwatch, refer to the Finding & interacting with DOM Elements guide page.
For more info on the new browser.element.find()
syntax, refer to the new Element API Overview page.
Usage
browser.element.find(selector).isEnabled()
Example
describe('isEnabled Demo', function() {
it('test isEnabled', function(browser) {
browser.element.find('#search')
.isEnabled()
.assert.equals(true);
});
it('test async isEnabled', async function(browser) {
const result = await browser.element.find('#search').isEnabled();
browser.assert.equal(result, true);
});
});
Returns
Type | description |
---|---|
ScopedValue<boolean> |