MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / getText

Function getText

javascript/atoms/typescript/get-text.ts:343–351  ·  view source on GitHub ↗
(element: Element)

Source from the content-addressed store, hash-verified

341// support ShadowRoot (every browser we support), falling back to the flat-DOM
342// path otherwise. (dom.js lines 1026-1035)
343function getText(element: Element): string {
344 const lines: string[] = []
345 if (typeof ShadowRoot === 'function') {
346 appendTextFromElementInComposedDom(element, lines)
347 } else {
348 appendTextFromElement(element, lines)
349 }
350 return concatenateCleanedLines(lines)
351}
352
353export default getText

Callers

nothing calls this directly

Calls 3

appendTextFromElementFunction · 0.85
concatenateCleanedLinesFunction · 0.85

Tested by

no test coverage detected