Skip to main content

Capture screenshot (detailed)

Referenced In

Fields

FieldTypeDescriptionDefault
pathstringOptional. File path of the PNG file. Accepts absolute paths. If not specified, the file name is the ID of the step.

Pattern: `([A-Za-z0-9_-]*.(png
PNG)$
directorystringOptional. Directory of the PNG file. If the directory doesn't exist, creates the directory.
maxVariationnumberOptional. Allowed variation in percentage of pixels between the new screenshot and the existing screenshot at path. If the difference between the new screenshot and the existing screenshot is greater than maxVariation, the step fails. If a screenshot doesn't exist at path, this value is ignored.

Minimum: 0. Maximum: 1
0.05
overwritestringOptional. If true, overwrites the existing screenshot at path if it exists.
If aboveVariation, overwrites the existing screenshot at path if the difference between the new screenshot and the existing screenshot is greater than maxVariation.

Accepted values: true, false, aboveVariation
aboveVariation
cropone of:
- string
- object(Crop by element (detailed))
Optional. No description provided.

Examples

{
"path": "example",
"directory": "example",
"maxVariation": 0.05,
"overwrite": "aboveVariation",
"crop": "example"
}