MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / isEnabled

Method isEnabled

lib/element/WebElement.js:160–171  ·  view source on GitHub ↗

* Check if element is enabled * @returns {Promise } True if element is enabled

()

Source from the content-addressed store, hash-verified

158 * @returns {Promise<boolean>} True if element is enabled
159 */
160 async isEnabled() {
161 switch (this.helperType) {
162 case 'playwright':
163 return this.element.isEnabled()
164 case 'webdriver':
165 return this.element.isEnabled()
166 case 'puppeteer':
167 return this.element.evaluate(el => !el.disabled)
168 default:
169 throw new Error(`Unsupported helper type: ${this.helperType}`)
170 }
171 }
172
173 /**
174 * Check if element exists in DOM

Callers 3

describeMethod · 0.95
WebElement_test.jsFile · 0.80
els_test.jsFile · 0.80

Calls 1

evaluateMethod · 0.80

Tested by 1

describeMethod · 0.76