MCPcopy
hub / github.com/codeceptjs/CodeceptJS / elementSelected

Function elementSelected

lib/helper/Puppeteer.js:3409–3416  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

3407}
3408
3409async function elementSelected(element) {
3410 const type = await element.getProperty('type').then(el => el.jsonValue())
3411
3412 if (type === 'checkbox' || type === 'radio') {
3413 return element.getProperty('checked').then(el => el.jsonValue())
3414 }
3415 return element.getProperty('selected').then(el => el.jsonValue())
3416}
3417
3418function isFrameLocator(locator) {
3419 locator = new Locator(locator)

Callers 2

filterFieldsByValueFunction · 0.70

Calls 1

getPropertyMethod · 0.80

Tested by

no test coverage detected