MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / grabCssPropertyFromAll

Method grabCssPropertyFromAll

lib/helper/Puppeteer.js:2062–2068  ·  view source on GitHub ↗

* {{> grabCssPropertyFromAll }}

(locator, cssProperty)

Source from the content-addressed store, hash-verified

2060 * {{> grabCssPropertyFromAll }}
2061 */
2062 async grabCssPropertyFromAll(locator, cssProperty) {
2063 const els = await this._locate(locator)
2064 const res = await Promise.all(els.map(el => el.evaluate(el => JSON.parse(JSON.stringify(getComputedStyle(el))))))
2065 const cssValues = res.map(props => props[toCamelCase(cssProperty)])
2066
2067 return cssValues
2068 }
2069
2070 /**
2071 * {{> grabCssPropertyFrom }}

Callers 5

grabCssPropertyFromMethod · 0.95
testsFunction · 0.45

Calls 3

_locateMethod · 0.95
toCamelCaseFunction · 0.90
evaluateMethod · 0.80

Tested by

no test coverage detected