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

Method _locateCheckable

lib/helper/Playwright.js:1797–1802  ·  view source on GitHub ↗

* Find a checkbox by providing human-readable text: * NOTE: Assumes the checkable element exists * * ```js * this.helpers['Playwright']._locateCheckable('I agree with terms and conditions').then // ... * ```

(locator, providedContext = null)

Source from the content-addressed store, hash-verified

1795 * ```
1796 */
1797 async _locateCheckable(locator, providedContext = null) {
1798 const context = providedContext || (await this._getContext())
1799 const els = await findCheckable.call(this, locator, context)
1800 assertElementExists(els[0], locator, 'Checkbox or radio')
1801 return selectElement(els, locator, this)
1802 }
1803
1804 /**
1805 * Find a clickable element by providing human-readable text:

Callers 2

checkOptionMethod · 0.95
uncheckOptionMethod · 0.95

Calls 3

_getContextMethod · 0.95
selectElementFunction · 0.90
assertElementExistsFunction · 0.70

Tested by

no test coverage detected