Skip to main content

[WebUI] Take a Screenshot as Checkpoint

Description

Take a screenshot of the current viewport to send to TestOps Vision. The captured image will be saved in .png format and stored in the keyes folder inn the report folder.

Keyword name: takeScreenshotAsCheckpoint

Parameters

Parameter Parameter TypeRequiredDescription
checkpointNameStringYesRepresents the name of the image on TestOps Vision. On local machine, this name will be appended with TestOps Vision prefix (keyes-).
flowControlFailureHandlingOptionalSpecify

failure handling

schema to determine whether the execution should be allowed to continue or stop.

Example

  • You want to take a screenshot as checkpoint named current_viewport for TestOps Vision and use default failure handling:
    WebUI.takeScreenshotAsCheckpoint('current_viewport')
  • You want to take a screenshot as checkpoint named full_view for TestOps Vision, and need the test to keep running regardless of this step having failed or passed:
    import com.kms.katalon.core.model.FailureHandling as FailureHandling

    WebUI.takeScreenshotAsCheckpoint('full_view', FailureHandling.CONTINUE_ON_FAILURE)
Was this page helpful?