Skip to main content

[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 TypeRequiredDescription
checkpointNameStringYesRepresents the name of the image on TestOps Vision. On a local machine, this name will be appended with TestOps Vision prefix (keyes-).
rectRectangleYesDefines location and size of the area you want to take screenshot. The area must be within the viewport.
flowControlFailureHandlingOptionalSpecify

failure handling

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))
Was this page helpful?