Take a screenshot of the current page and saves it as the given filename.

Usage

Parameters

Name Type description
fileName string

The complete path to the file name where the screenshot should be saved.

callback
Optional
function

Optional callback function to be called when the command finishes.

Example

 this.demoTest = function (browser) {
   browser.saveScreenshot('/path/to/fileName.png');
 };

See also