MCPcopy
hub / github.com/codeceptjs/CodeceptJS / seeElement

Method seeElement

lib/helper/WebDriver.js:1642–1652  ·  view source on GitHub ↗

* {{> seeElement }} *

(locator, context = null)

Source from the content-addressed store, hash-verified

1640 *
1641 */
1642 async seeElement(locator, context = null) {
1643 const locateFn = prepareLocateFn.call(this, context)
1644 const res = context ? await locateFn(locator) : await this._locate(locator, true)
1645 assertElementExists(res, locator)
1646 const selected = await forEachAsync(res, async el => el.isDisplayed())
1647 try {
1648 return truth(`elements of ${new Locator(locator)}`, 'to be seen').assert(selected)
1649 } catch (e) {
1650 dontSeeElementError(locator)
1651 }
1652 }
1653
1654 /**
1655 * {{> dontSeeElement }}

Callers

nothing calls this directly

Calls 6

_locateMethod · 0.95
truthFunction · 0.90
dontSeeElementErrorFunction · 0.90
forEachAsyncFunction · 0.85
assertMethod · 0.80
assertElementExistsFunction · 0.70

Tested by

no test coverage detected