Extract Image
This action extracts an image from the found tag and stores it in a variable or to a file.
The action can also optionally store the actual content type and file name of the extracted image in other variables.
Properties
The Extract Image action can be configured using the following properties.
- Store In
-
Specifies where to store the extracted image. There are two choices for this:
- Variable
-
Specifies the variable in which to store the extracted data. The variable must be of type Image or Binary. Using the specialized Image variable is recommended as it will be possible to see a preview of the extracted image in the Variables view.
- File
-
Specifies the file to write the data to
- File Name
-
Specifies the name and extension of the file.
- Auto
-
With this option a file name is generated automatically using the following strategy:
-
First the content disposition header of the response is inspected to see if it has a filename parameter and if so that name will be used.
-
Next the URL is inspected to see if it contains a file name and if so that name will be used.
-
If none of the above options succeed then an error is generated.
-
- Value, Variable, Expression and Converters
-
The value can be specified in several ways using the Value Selector.
- Directory
-
Specifies the directory where the file will be placed. The value can be specified in several ways using the Value Selector.
- Create Directories
-
Specifies whether to create all the directories, in the specified path, that does not exist. If the option is selected the directories are created. If the option is not selected the directories must exist and if not an error is generated.
- Override Strategy
-
This specifies a strategy for what to do when the selected file already exists.
- Override File
-
Any existing file will be replaced.
- Never Override File
-
Ensures that an existing file will never be replaced. If the file exists then an error is generated.
- Create a New File
-
This option ensures that a new file will always be created. If a file with the selected name already exists then a new unique file name will be generated for the new file. This new file name will be the originally selected file name with a serial number added to the end just before the extension, e.g. myImage_1.png where _1 was added to the original file name myImage.png.
- Store Meta Data In
-
Specifies variables to be used to store meta data about the extracted image.
- Content Type
-
Specifies an optional variable in which to store the content type of the image. For example, the content type could look like this: image/gif
- File Name
-
Specifies the optional variable in which to store the file name of the extracted image. If the image is saved to a file then the file name will be the full path of the file actually used. If the image is loaded into a variable then the file name will be the file name of the original resource (obtained from the URL or from the content disposition header for the response).
- Options
-
The robot's options can be overridden with the step's own options. An option that is marked with an asterisk in the Options Dialog will override the one from the robot's configuration. All other options will be the same as specified for the robot.