Check if specified DOM property value of a given element matches a regex. For all the available DOM element properties, consult the Element doc at MDN.

Usage

Example

this.demoTest = function (browser) {
  browser.assert.domPropertyMatches('#main', 'tagName', /^frame/);
}

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.

domProperty string

The DOM property name.

regexExpression string | RegExp

Regex to match against.

msg
Optional
string

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