* Find a checkbox by providing human-readable text: * NOTE: Assumes the checkable element exists * * ```js * this.helpers['Puppeteer']._locateCheckable('I agree with terms and conditions').then // ... * ```
(locator, providedContext = null)
| 1028 | * ``` |
| 1029 | */ |
| 1030 | async _locateCheckable(locator, providedContext = null) { |
| 1031 | const context = providedContext || (await this._getContext()) |
| 1032 | const els = await findCheckable.call(this, locator, context) |
| 1033 | if (!els || els.length === 0) { |
| 1034 | throw new ElementNotFound(locator, 'Checkbox or radio') |
| 1035 | } |
| 1036 | return selectElement(els, locator, this) |
| 1037 | } |
| 1038 | |
| 1039 | /** |
| 1040 | * Find a clickable element by providing human-readable text: |
no test coverage detected