Namespace: webdriver
View Source

# class Command

Describes a command to be executed by the WebDriverJS framework.

## new Command(name)

Parameters

name`string`

  The name of this command.

## Instance Methods

### getName()code »

Returns

`string`

  This command's name.

### getParameter(key)code »

Returns a named command parameter.

Parameters

key`string`

  The parameter key to look up.

Returns

The parameter value, or undefined if it has not been set.

### getParameters()code »

Returns

`Object<?, *>`

  The parameters to send with this command.

### setParameter(name, value)code »

Sets a parameter to send with this command.

Parameters

name`string`

  The parameter name.

value`*`

  The parameter value.

Returns

`webdriver.Command`

  A self reference.

### setParameters(parameters)code »

Sets the parameters for this command.

Parameters

parameters`Object<?, *>`

  The command parameters.

Returns

`webdriver.Command`

  A self reference.