MCPcopy Create free account
hub / github.com/codeceptjs/CodeceptJS / grabCssPropertyFrom

Method grabCssPropertyFrom

lib/helper/Puppeteer.js:2073–2082  ·  view source on GitHub ↗

* {{> grabCssPropertyFrom }}

(locator, cssProperty)

Source from the content-addressed store, hash-verified

2071 * {{> grabCssPropertyFrom }}
2072 */
2073 async grabCssPropertyFrom(locator, cssProperty) {
2074 const cssValues = await this.grabCssPropertyFromAll(locator, cssProperty)
2075 assertElementExists(cssValues, locator)
2076
2077 if (cssValues.length > 1) {
2078 this.debugSection('GrabCSS', `Using first element out of ${cssValues.length}`)
2079 }
2080
2081 return cssValues[0]
2082 }
2083
2084 /**
2085 * {{> seeCssPropertiesOnElements }}

Callers 5

testsFunction · 0.45

Calls 2

assertElementExistsFunction · 0.70

Tested by

no test coverage detected