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

Function classNameMany

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

Source from the content-addressed store, hash-verified

36 }
37
38 function classNameMany(target: string, root: Root): Element[] {
39 if (!target) {
40 throw botError(INVALID_SELECTOR, 'No class name specified')
41 }
42 target = target.trim()
43 if (target.indexOf(' ') !== -1) {
44 throw botError(INVALID_SELECTOR, 'Compound class names not permitted')
45 }
46 try {
47 return Array.from(root.querySelectorAll('.' + target.replace(/\\/g, '\\\\').replace(/\./g, '\\.')))
48 } catch (_e) {
49 throw botError(INVALID_SELECTOR, 'An invalid or illegal class name was specified')
50 }
51 }
52
53 function cssMany(target: string, root: Root): Element[] {
54 try {

Callers 1

find-elements.tsFile · 0.85

Calls 2

botErrorFunction · 0.85
fromMethod · 0.45

Tested by

no test coverage detected