Definition and Usage
This command allows you to capture a screenshot of a specific element, the visible area, or an entire web page. You can specify the format and location for saving the image, with options to customize the file name or generate it automatically.
Parameter Values
Input parameters
Parameter | Description | Possible Values | Required | Options / Notes |
Web page | Select a variable that contains the web page to work with |
| Yes | Must be a valid web page object |
Capture | Specify the area to capture | Specific element, Visible area, Entire web page | Yes |
|
Element | Select or capture an element to operate on |
| Yes, if "Specific element" is selected | Use the Capture button to select an element |
Save to | Select a folder to save the captured image |
| Yes | Select a valid folder path |
Image format | Select a format to save the image file | Jpeg, Png | Yes |
|
File name | Select whether to generate a random or custom file name | Auto-generated, Custom | Yes |
|
Customize file name | Set the file name to save the image |
| Yes, if "Custom" is selected |
|
Overwrite if exists | Overwrite if a file with the same name already exists |
| No | Checkbox option |
Advanced settings
Parameter | Description | Possible Values | Required | Options / Notes |
Element timeout (s) | Wait time for element to appear (seconds) | - | No | Default is 20 seconds |
Error handling
Parameter Name | Description |
Throw error & stop | When an error occurs, the action will trigger an error and stop the execution of the entire app. |
Retry command | If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process. |
Ignore error & continue | When an error occurs, the action will be ignored, and the workflow will continue without interruption. |
Variables produced
Store file path into: Stores the image's file path into a new variable. This variable will contain the full path to the saved screenshot file.
Using Variables in Conditions
You can use variables in various parameters of this command by clicking the {x} icon. For example, you can use variables to dynamically set the save location or file name. Make sure the variable types match the expected parameter types - string variables for file paths and names, and web page objects for the Web page parameter.
Notes
Ensure the web page is fully loaded before taking a screenshot to avoid capturing incomplete content.
When capturing a specific element, make sure the element is visible in the viewport, or set an appropriate timeout value.
If using "Entire web page" option, be aware that it may take longer to process for pages with extensive content.
The command will fail if the specified element cannot be found or if the save location is invalid or inaccessible.