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

Method grabTextFrom

lib/helper/Puppeteer.js:2002–2010  ·  view source on GitHub ↗

* {{> grabTextFrom }}

(locator)

Source from the content-addressed store, hash-verified

2000 * {{> grabTextFrom }}
2001 */
2002 async grabTextFrom(locator) {
2003 const texts = await this.grabTextFromAll(locator)
2004 assertElementExists(texts, locator)
2005 if (texts.length > 1) {
2006 this.debugSection('GrabText', `Using first element out of ${texts.length}`)
2007 }
2008
2009 return texts[0]
2010 }
2011
2012 /**
2013 * {{> grabValueFromAll }}

Callers

nothing calls this directly

Calls 2

grabTextFromAllMethod · 0.95
assertElementExistsFunction · 0.70

Tested by

no test coverage detected