* Appium: not tested * {{> uncheckOption }}
(field, context = null)
| 1403 | * {{> uncheckOption }} |
| 1404 | */ |
| 1405 | async uncheckOption(field, context = null) { |
| 1406 | const clickMethod = this.browser.isMobile && this.browser.capabilities.platformName !== 'android' ? 'touchClick' : 'elementClick' |
| 1407 | const locateFn = prepareLocateFn.call(this, context) |
| 1408 | |
| 1409 | const res = await findCheckable.call(this, field, locateFn) |
| 1410 | |
| 1411 | assertElementExists(res, field, 'Checkable') |
| 1412 | const elem = selectElement(res, field, this) |
| 1413 | const elementId = getElementId(elem) |
| 1414 | highlightActiveElement.call(this, elem) |
| 1415 | |
| 1416 | const isSelected = await isElementChecked(this.browser, elementId) |
| 1417 | |
| 1418 | if (!isSelected) return Promise.resolve(true) |
| 1419 | return this.browser[clickMethod](elementId) |
| 1420 | } |
| 1421 | |
| 1422 | /** |
| 1423 | * {{> grabTextFromAll }} |
nothing calls this directly
no test coverage detected