[WebUI] Take Full Page Screenshot as Checkpoint
Description
Note:
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. - 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.
Keyword name: takeFullPageScreenshotAsCheckpoint
Parameters
Parameter | Parameter Type | Required | Description |
---|---|---|---|
checkpointName | String | Yes | Represents the name of the image on TestOps Vision. On local machine, this name will be appended with TestOps Vision prefix (keyes- ). |
ignoredElements | List | Optional | List of Test Objects you want to hide when taking a screenshot. |
flowControl | FailureHandling | Optional | Specify 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 namedignoredElements
:// where ignoredElements is a user-defined List-typed variable. WebUI.takeFullPageScreenshotAsCheckpoint('full_view_no_elements', ignoredElements)