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

Function linkTextMany

javascript/atoms/typescript/find-elements.ts:80–85  ·  view source on GitHub ↗
(target: string, root: Root, partial: boolean)

Source from the content-addressed store, hash-verified

78 }
79
80 function linkTextMany(target: string, root: Root, partial: boolean): Element[] {
81 return Array.from(root.querySelectorAll('a')).filter(el => {
82 const text = getLinkText(el)
83 return partial ? text.indexOf(target) !== -1 : text === target
84 })
85 }
86
87 function nameMany(target: string, root: Root): Element[] {
88 return Array.from(root.querySelectorAll('[name="' + target.replace(/\\/g, '\\\\').replace(/"/g, '\\"') + '"]'))

Callers 1

find-elements.tsFile · 0.85

Calls 3

getLinkTextFunction · 0.85
filterMethod · 0.80
fromMethod · 0.45

Tested by

no test coverage detected