* {{> checkOption }}
(field, context = null)
| 1463 | * {{> checkOption }} |
| 1464 | */ |
| 1465 | async checkOption(field, context = null) { |
| 1466 | const elm = await this._locateCheckable(field, context) |
| 1467 | let curentlyChecked = await elm |
| 1468 | .getProperty('checked') |
| 1469 | .then(checkedProperty => checkedProperty.jsonValue()) |
| 1470 | .catch(() => null) |
| 1471 | |
| 1472 | if (!curentlyChecked) { |
| 1473 | const ariaChecked = await elm.evaluate(el => el.getAttribute('aria-checked')) |
| 1474 | curentlyChecked = ariaChecked === 'true' |
| 1475 | } |
| 1476 | |
| 1477 | if (!curentlyChecked) { |
| 1478 | await elm.click() |
| 1479 | return this._waitForAction() |
| 1480 | } |
| 1481 | } |
| 1482 | |
| 1483 | /** |
| 1484 | * {{> uncheckOption }} |
nothing calls this directly
no test coverage detected