Convenience command that adds the specified hash (i.e. url fragment) to the current value of the launch_url as set in nightwatch.json.

Usage

Parameters

Name Type description
hash string

The hash to add/replace to the current url (i.e. the value set in the launch_url property in nightwatch.json).

callback
Optional
function

Optional callback function to be called when the command finishes.

Example

this.demoTest = function (client) {
  client.urlHash('#hashvalue');
  // or
  client.urlHash('hashvalue');
};

See also