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

Method grabTextFrom

lib/helper/WebDriver.js:1441–1449  ·  view source on GitHub ↗

* {{> grabTextFrom }} *

(locator)

Source from the content-addressed store, hash-verified

1439 *
1440 */
1441 async grabTextFrom(locator) {
1442 const texts = await this.grabTextFromAll(locator)
1443 assertElementExists(texts, locator)
1444 if (texts.length > 1) {
1445 this.debugSection('GrabText', `Using first element out of ${texts.length}`)
1446 }
1447
1448 return texts[0]
1449 }
1450
1451 /**
1452 * {{> grabHTMLFromAll }}

Callers

nothing calls this directly

Calls 2

grabTextFromAllMethod · 0.95
assertElementExistsFunction · 0.70

Tested by

no test coverage detected