getElementCssValue
To get an element's desired css/style
value, this function looks into the computed style (evaluated by browser once rendered) of the element.
For example, to view computed style of an element in chrome
, view an element in developer tool's Elements
panel. There you will see 'Style' and 'Computed' tabs within the panel.
getElementCssValue(elemId, property)
#
ParameterselemId
: The target elementproperty
: The name of property
#
Returns- value of the property or nothing if doesn't exists
Examples
resultLabelColor = getElementCssValue(findElement('resultLabel', by.testId), 'color')# returns the color of element