MCPcopy
hub / github.com/codeceptjs/CodeceptJS / grabCssPropertyFrom

Method grabCssPropertyFrom

lib/helper/WebDriver.js:1515–1524  ·  view source on GitHub ↗

* {{> grabCssPropertyFrom }}

(locator, cssProperty)

Source from the content-addressed store, hash-verified

1513 * {{> grabCssPropertyFrom }}
1514 */
1515 async grabCssPropertyFrom(locator, cssProperty) {
1516 const cssValues = await this.grabCssPropertyFromAll(locator, cssProperty)
1517 assertElementExists(cssValues, locator)
1518
1519 if (cssValues.length > 1) {
1520 this.debugSection('GrabCSS', `Using first element out of ${cssValues.length}`)
1521 }
1522
1523 return cssValues[0]
1524 }
1525
1526 /**
1527 * {{> grabAttributeFromAll }}

Callers 1

Calls 2

assertElementExistsFunction · 0.70

Tested by

no test coverage detected