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

Method grabWebElement

lib/helper/Puppeteer.js:1075–1081  ·  view source on GitHub ↗

* {{> grabWebElement }} *

(locator)

Source from the content-addressed store, hash-verified

1073 *
1074 */
1075 async grabWebElement(locator) {
1076 const elements = await this._locate(locator)
1077 if (elements.length === 0) {
1078 throw new ElementNotFound(locator, 'Element')
1079 }
1080 return new WebElement(elements[0], this)
1081 }
1082
1083 async grabWebElement(locator) {
1084 const els = await this._locate(locator)

Callers 2

Playwright_test.jsFile · 0.45
testsFunction · 0.45

Calls 2

_locateMethod · 0.95
assertElementExistsFunction · 0.70

Tested by

no test coverage detected