Checks if the given form element's value equals the expected value.

The existing .assert.value() command.

Usage

Example

this.demoTest = function (browser) {
  browser.assert.valueEquals("form.login input[type=text]", "username");
};

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.

expected string

The expected text.

msg
Optional
string

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