Skip to main content


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)


  • elemId: The target element
  • property: The name of property


  • value of the property or nothing if doesn't exists


resultLabelColor = getElementCssValue(findElement('resultLabel', by.testId), 'color')# returns the color of element