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

Method grabWebElement

lib/helper/WebDriver.js:1029–1035  ·  view source on GitHub ↗

* {{> grabWebElement }} *

(locator)

Source from the content-addressed store, hash-verified

1027 *
1028 */
1029 async grabWebElement(locator) {
1030 const elements = await this._locate(locator)
1031 if (elements.length === 0) {
1032 throw new ElementNotFound(locator, 'Element')
1033 }
1034 return new WebElement(elements[0], this)
1035 }
1036
1037 /**
1038 * Set [WebDriver timeouts](https://webdriver.io/docs/timeouts.html) in realtime.

Callers

nothing calls this directly

Calls 1

_locateMethod · 0.95

Tested by

no test coverage detected