Save Image Version 9 (Java)
Action group: Browsers
Description
The action saves the image from the web page to a file on the local computer and returns the full path to that file.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Context | Action context for working with the browser. | Robin.Selenium | Browser context | Yes |
Element | Web element with image | Robin.WebElement | Yes | |
Folder path | Path to folder to save image | Robin.FolderPath | C:\doc\img | Yes |
Image source | Source of saved image. There are 3 options available: 1) Resource URL. Saves images by URL. Suitable for images enclosed in an img tag. Not suitable for saving captcha and other types of images. 2) Scripts (JS script is used). Saves image using JS scripts. Suitable for saving any images, including captcha. 3) Screenshot (JS script is used). Cuts an image from a screenshot of a browser window. Allows you to save images that do not go beyond the browser window, including captcha. | Robin.String | No | |
Results | ||||
Path to image file | Path to image file | Robin.Image | C:\doc\img.png |
Special conditions of use
- It is assumed that the desired page is already open in the browser.
- To avoid conflicts with the uniqueness of image file names, it is suggested to use the generated GUID as the file name.
- The preferred format in which the image is saved is PNG.
Example of use
Task
Follow the link https://bankrot.cdtrf.ru/public/default.aspx and save the image from the web page.
Solution
Use the "Open Browser", "Navigate", "Save Image" actions.
Implementation
- Assemble a robot scheme with the actions.
- Set the "Open Browser" action parameters.
- Set the "Navigate" action parameters.
- Set the "Save Image" action parameters. To create an element use the WebSpy tool (see section Create Web-element).
- Click "Start" in the top panel.
Result
The program robot completed successfully.
The image is saved.
Обзор
Инструменты контента