Checks if the specified css property of a given element has the expected value.

Usage

Example

this.demoTest = function (browser) {
  browser.assert.cssProperty('#main', 'display', 'block');
};

Parameters

Name Type description
definition string | object

The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies element properties.

cssProperty string

The CSS property.

expected string

The expected value of the css property to check.

msg
Optional
string

Optional log message to display in the output. If missing, one is displayed by default.