Checks if the current URL contains the given value.

Usage

Example

this.demoTest = function (browser) {
  browser.assert.urlContains('nightwatchjs.org');
};

Parameters

Name Type description
expected string

The value expected to exist within the current URL.

msg
Optional
string

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