function: takeScreenshot - egroise/uxtest GitHub Wiki

###Usage

takeScreenshot(name)

Saves the current screen into a PNG picture. (screenshot is added in the output folder defined by startTest). The link to the screenshot is also added to the HTML report.

Warning: If you are using a multi-monitor environment: only your main screen will be screenshot.

Example: uxtst.takeScreenshot("My screenshot") will add this line to the report :

###Parameters

  • name: Name of the PNG to be saved (without extension).

###Example

takeScreenshot("Home screen")

...will save screenshot to "Home screen.png" in the report folder.