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

Method dontSeeElement

lib/helper/WebDriver.js:1657–1669  ·  view source on GitHub ↗

* {{> dontSeeElement }}

(locator, context = null)

Source from the content-addressed store, hash-verified

1655 * {{> dontSeeElement }}
1656 */
1657 async dontSeeElement(locator, context = null) {
1658 const locateFn = prepareLocateFn.call(this, context)
1659 const res = context ? await locateFn(locator) : await this._locate(locator, false)
1660 if (!res || res.length === 0) {
1661 return truth(`elements of ${new Locator(locator)}`, 'to be seen').negate(false)
1662 }
1663 const selected = await forEachAsync(res, async el => el.isDisplayed())
1664 try {
1665 return truth(`elements of ${new Locator(locator)}`, 'to be seen').negate(selected)
1666 } catch (e) {
1667 seeElementError(locator)
1668 }
1669 }
1670
1671 /**
1672 * {{> seeElementInDOM }}

Callers

nothing calls this directly

Calls 5

_locateMethod · 0.95
truthFunction · 0.90
seeElementErrorFunction · 0.90
forEachAsyncFunction · 0.85
negateMethod · 0.80

Tested by

no test coverage detected