Skip to main content

[WebUI] Take Full Page Screenshot as Checkpoint

Description

Note:
  • If this method is used with the ignored elements, JavaScript is required to be enabled on test browser. The method used to take an entire-page screenshot is simulating a scroll action to the end of the page. If the web page uses infinity-scrolling, it's not recommended to use this keyword.
Take an entire-page screenshot to send to TestOps Vision. The captured image will be saved in '.png' format and stored in the 'keyes' folder in the report folder. This method simulates a scroll action, takes a numbers of shots, then merges them together to make a full-page screenshot.

Keyword name: takeFullPageScreenshotAsCheckpoint

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-).
ignoredElementsListOptionalList of Test Objects you want to hide when taking a screenshot.
flowControlFailureHandlingOptionalSpecify

failure handling

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

Example

  • You want to take a full-page screenshot as TestOps Vision checkpoint named full-page and use default failure handling:
    WebUI.takeFullPageScreenshotAsCheckpoint('current_viewport')
  • You want to take a full-page screenshot as TestOps Vision checkpoint named full_view_no_logo and hide some web elements:
    import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

    WebUI.takeFullPageScreenshotAsCheckpoint('full_view_no_elements', [findTestObject('UI/logo')])ebUI.takeFullPageScreenshotAsCheckpoint('current_viewport')
  • You want to take a full-page screenshot as TestOps Vision checkpoint named full_view_no_elements and hide some web elements defined in a variable named ignoredElements:
    // where ignoredElements is a user-defined List-typed variable. WebUI.takeFullPageScreenshotAsCheckpoint('full_view_no_elements', ignoredElements)
Was this page helpful?