[WebUI] Take Area Screenshot as a Checkpoint
Description
Take a screenshot of a specific area in the viewport to send to TestOps Vision. The captured image will be saved in .png
format and stored in the keyes
folder in the report folder.
Keyword name: takeAreaScreenshotAsCheckpoint
Parameters
Parameter | Parameter Type | Required | Description |
---|---|---|---|
checkpointName | String | Yes | Represents the name of the image on TestOps Vision. On a local machine, this name will be appended with TestOps Vision prefix (keyes- ). |
rect | Rectangle | Yes | Defines location and size of the area you want to take screenshot. The area must be within the viewport. |
flowControl | FailureHandling | Optional | Specify schema to determine whether the execution should be allowed to continue or stop. |
Example
You want to take TestOps Vision screenshot of an area at
x: 50
, y: 25
, width: 100
, height: 150
: import org.openqa.selenium.Rectangle as Rectangle
WebUI.takeAreaScreenshotAsCheckpoint('advertisements', new Rectangle(50, 25, 150, 100))