# Namespace webdriver.process

code »
Show:Public Protected Private

## Global Functions

code »webdriver.process.getEnv ( name, opt_default ) ⇒ `string`

Queries for a named environment variable.

Parameters

name: `string`
  The name of the environment variable to look up.
opt_default: `string=`
  The default value if the named variable is not defined.

Returns

The queried environment variable.

code »webdriver.process.initBrowserProcess_ ( opt_window ) ⇒ `!Object`

Initializes a process object for use in a browser window.

Parameters

opt_window: `!Window=`
  The window object to initialize the process from; if not specified, will default to the current window. Should only be set for unit testing.

Returns

The new process object.

code »webdriver.process.isNative ( ) ⇒ `boolean`

Returns

Whether the current process is Node's native process object.

code »webdriver.process.setEnv ( name, value )

Sets an environment value. If the new value is either null or undefined, the environment variable will be cleared.

Parameters

name: `string`
  The value to set.
value: `*`
  The new value; will be coerced to a string.

## Global Properties

code »webdriver.process.IS_NATIVE_PROCESS_ : `boolean`

Whether the current environment is using Node's native process object.

code »webdriver.process.PROCESS_ : `!Object`

The global process object to use. Will either be Node's global `process` object, or an approximation of it for use in a browser environment.