module selenium-webdriver/io

Functions

copy(src, dst)code »

Copies one file to another.

Parameters
srcstring

The source file.

dststring

The destination file.

Returns
webdriver.promise.Promise

A promise for the copied file's path.


copyDir(src, dst, opt_exclude)code »

Recursively copies the contents of one directory to another.

Parameters
srcstring

The source directory to copy.

dststring

The directory to copy into.

opt_exclude?(RegEx|function(string): boolean)=

An exclusion filter as either a regex or predicate function. All files matching this filter will not be copied.

Returns
webdriver.promise.Promise

A promise for the destination directory's path once all files have been copied.


exists(path)code »

Tests if a file path exists.

Parameters
pathstring

The path to test.

Returns
webdriver.promise.Promise

A promise for whether the file exists.


findInPath(file, opt_checkCwd)code »

Searches the PATH environment variable for the given file.

Parameters
filestring

The file to locate on the PATH.

opt_checkCwdboolean=

Whether to always start with the search with the current working directory, regardless of whether it is explicitly listed on the PATH.

Returns
?string

Path to the located file, or null if it could not be found.


rmDir(path)code »

Recursively removes a directory and all of its contents. This is equivalent to rm -rf on a POSIX system.

Parameters
pathstring

Path to the directory to remove.

Returns
webdriver.promise.Promise

A promise to be resolved when the operation has completed.


tmpDir()code »

Returns
webdriver.promise.Promise

A promise for the path to a temporary directory.


tmpFile(opt_options)code »

Parameters
opt_options{postfix: string}=

Temporary file options.

Returns
webdriver.promise.Promise

A promise for the path to a temporary file.