Block reference / Web interaction
Save assets
Save an image, video, audio or other file to your Downloads folder, from an element or a URL.
Only in
WarpX Browser
Save assets downloads a file to the computer running WarpX Browser. Point it at an <img>, <video> or <audio> element to save what it shows, or give it a web address directly. The profile's browser loads the file, through the profile's proxy and with its cookies, so the site sees the same visitor as the page. It suits saving avatars, product photos or a PDF link while a workflow walks through pages.
Settings
- Type
Media element (image, audio, or video) saves the file an element on the page shows. URL saves the file at an address you give.
ExampleMedia element (image, audio, or video)- Element Selectorwhen Type is Media element (image, audio, or video)
The element whose file to save: an
<img>or anything else with asrc. For<video>and<audio>, the address comes from the first<source>inside it. Write a CSS selector or an XPath: a value that starts with/,(,@orid(is read as XPath. The target button lets you click the element in the profile's browser, inside iframes and shadow roots too, and the double tick checks that the selector finds something.Exampleimg.profile-avatar- Multiplewhen Type is Media element (image, audio, or video)
Saves the file of every match, not just the first. With a fixed Filename (optional), see On conflict for how the files are named.
ExampleUnchecked- Mark elementwhen Type is Media element (image, audio, or video), and the selector is CSS
Tags each element the block acts on, and skips tagged elements the next time this block runs, so a loop moves on to the next match. Only offered for a CSS selector.
ExampleUnchecked- Wait for selectorwhen Type is Media element (image, audio, or video)
Keeps looking for the element until it appears or the timeout runs out. Off, the block looks once.
ExampleChecked- Selector timeout (ms)when Type is Media element (image, audio, or video), and Wait for selector is on
How long to keep looking, in milliseconds. The default is
5000.Example10000- URLwhen Type is URL
The address of the file, starting with
http://orhttps://. It takes references such as{{variables.invoiceUrl}}. An address the site serves as a download works too: the file is taken from the download it starts.Examplehttps://cdn.example.com/files/invoice-2291.pdf- Filename (optional)
The name to save under, inside your Downloads folder. It can include folders, such as
avatars/anna.jpg, which are created as needed;..is ignored, so the file always stays inside Downloads. Left empty, the name is the last part of the address when it has an extension, such asinvoice-2291.pdf; otherwise the name the site gives the download, and failing thatdownload-and a timestamp, such asdownload-1758290000000.Exampleavatars/anna.jpg- On conflict
What happens when a file with that name is already there. Uniquify, the default, keeps both and saves the new one as a numbered copy, such as
anna (1).jpg. Overwrite replaces the old file. Prompt cannot ask in WarpX Browser and keeps both, like Uniquify.ExampleUniquify- Save items' download IDs
Keeps the IDs of the saved files, as a list, in a variable or table column.
ExampleUnchecked- Assign to variablewhen Save items' download IDs is on
Puts the list of IDs in a variable.
ExampleChecked- Variable namewhen Assign to variable is on
The variable to write, read later as
{{variables.avatarDownloads}}.ExampleavatarDownloads- Insert to tablewhen Save items' download IDs is on
Adds the list of IDs to a table column. On by default.
ExampleUnchecked- Select columnwhen Insert to table is on
The table column that gets the IDs.
Exampledownloads- Delay time (ms)
How long to wait after the block finishes, in milliseconds. Write a range such as
1000,3000to pick a random wait in it each run.Example500
Every block also has the shared block settings — a description, Disable block and what to do on an error, and Finding elements explains selectors in more depth. Fields that take text accept data from earlier blocks.
What it hands on
Files go to the Downloads folder of your user account on the computer running WarpX Browser. Nothing is written to the table or variables unless Save items' download IDs is on. Leaves by its single output; its result lists the addresses saved and their IDs. It fails with element-not-found when the selector finds nothing, and fails when the file cannot be loaded, including when the site answers with an error page (HTTP 400 or above), which is never saved.
Example: Save a member's avatar from their profile page
- Start
- Open URL
- Save assets
- Add Open URL after Start with
https://forum.example.com/u/anna. - Add Save assets and keep Type on Media element (image, audio, or video).
- Click the target button next to Element Selector and click the avatar in the profile's browser, or type
img.profile-avatar. - Tick Wait for selector and set Selector timeout (ms) to
10000. - Set Filename (optional) to
avatars/anna.jpgand leave On conflict on Uniquify. - Run the workflow. The picture is saved as
avatars/anna.jpginside your Downloads folder. Run it again and the second copy isavatars/anna (1).jpg.
Good to know
- The file is loaded by the profile's browser, through its proxy and with its cookies, user agent and fingerprint, and the page's address is sent as the referrer. A file behind the profile's sign-in saves, and the site sees the profile's IP address, not yours.
- To load the file, the profile's browser opens a tab of its own and closes it as soon as the file is read. In a visible profile window you may see that tab for a moment.
- A file that takes longer than a minute to load fails the block.
- With Multiple, a fixed Filename (optional) and Overwrite, the second and later files of one run get
(1),(2)in front of their names, so they do not replace each other. The next run replaces them. - Addresses that start with
blob:, which many video players use, cannot be saved; the block fails.data:addresses can, but On conflict does not apply to them: a file with the same name is replaced. Without a Filename (optional) they are saved asdownload-and a timestamp, with no extension. - A
<video>or<audio>element with its address on the element itself and no<source>inside saves nothing, without an error. So does a matched element with nosrc. Read the address with Attribute value and save it with Type set to URL instead. - The download IDs are numbers WarpX Browser counts up while it runs, starting again from 1 when it restarts. They are not IDs Handle download can look up.
See also
- Handle download — Names the file the page downloads, waits for it, and hands on where it was saved.
- Take screenshot — Captures the visible page, the whole page or one element as an image, and saves it as a file, in the table or in a variable.
- Attribute value — Read or set an HTML attribute on an element, such as a link's
hrefor an image'ssrc. - Upload file — Put one or more files into a file input on the page, from your computer, a URL or inline data.