MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / getLinkText

Function getLinkText

javascript/atoms/typescript/find-elements.ts:75–78  ·  view source on GitHub ↗
(el: Element)

Source from the content-addressed store, hash-verified

73 }
74
75 function getLinkText(el: Element): string {
76 const text = (el as HTMLElement).innerText !== undefined ? (el as HTMLElement).innerText : el.textContent || ''
77 return text.replace(/^[\s]+|[\s]+$/g, '')
78 }
79
80 function linkTextMany(target: string, root: Root, partial: boolean): Element[] {
81 return Array.from(root.querySelectorAll('a')).filter(el => {

Callers 1

linkTextManyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected