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

Method grabValueFrom

lib/helper/Puppeteer.js:2027–2035  ·  view source on GitHub ↗

* {{> grabValueFrom }}

(locator)

Source from the content-addressed store, hash-verified

2025 * {{> grabValueFrom }}
2026 */
2027 async grabValueFrom(locator) {
2028 const values = await this.grabValueFromAll(locator)
2029 assertElementExists(values, locator)
2030 if (values.length > 1) {
2031 this.debugSection('GrabValue', `Using first element out of ${values.length}`)
2032 }
2033
2034 return values[0]
2035 }
2036
2037 /**
2038 * {{> grabHTMLFromAll }}

Callers

nothing calls this directly

Calls 2

grabValueFromAllMethod · 0.95
assertElementExistsFunction · 0.70

Tested by

no test coverage detected