Skip to main content

[WebUI] Take Screenshot As Checkpoint

Note:
  • From version 7.7.0, this keyword is available.

takeScreenshotAsCheckpoint

  • 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
  • Keyword syntax:
    WebUI.takeScreenshotAsCheckpoint(checkpointName, flowControl)
  • Parameters:

    • Name: checkpointName

      • Description: A String that represents the name of the image on TestOps Vision. On local machine, this name will be appended with TestOps Vision prefix('keyes-').
      • Parameter Type: String
      • Mandatory: Required
    • Name: flowControl

      • Description: Specify failure handling schema to determine whether the execution should be allowed to continue or stop.
      • Parameter Type: FailureHandling
      • Mandatory: Optional
  • Examples:
    • 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)