Block reference / Web interaction
Click element
Click an element on the page, with human-like mouse movement by default.
Only in
WarpX Browser
Click element presses a button, link, tab or any other element. By default the pointer travels to the element the way a person moves a mouse, scrolling it into view first. Turn Human Emulation off when speed matters more than looking natural.
Settings
- Element Selector
The element to act on, as a CSS selector or an XPath; anything starting with
/,(,@orid(is read as XPath, and it can hold a reference such as{{variables.selector}}. The crosshair button (Select an element) lets you pick the element in the profile's browser, including inside iframes and shadow roots, and the check button (Verify selector) tests what you typed.Example//a[contains(., "Next")]- Multiple
Clicks every matching element, one after another in page order, instead of only the first. The block fails only if every click fails.
ExampleUnchecked- Mark elementwhen the selector is CSS
Skips elements this block has already handled, and tags the one it handles once the action is done, so inside a loop each pass takes the next untouched match. With Multiple, every match is tagged after all of them are handled. The tag is the attribute
block--plus the block's id, so it is gone once the page reloads or changes; only offered for CSS selectors.ExampleUnchecked- Wait for selector
Waits, up to Selector timeout (ms), for the element to be rendered and visible before acting on it. Use it for elements that appear after a click or a network request.
ExampleChecked- Selector timeout (ms)when Wait for selector is on
How long Wait for selector keeps looking, in milliseconds. The default is
5000.Example8000- Human Emulation
On (the default), moves the pointer to the element along a human-like path, scrolling with the mouse wheel if needed, and presses it with natural timing. Off, the element is clicked at once.
ExampleChecked- Delay time (ms)
A pause after the block finishes, before the next block starts. Write one number such as
1000, or a range such as1000,3000to pick a random pause in that range on each run.Example1500,3000
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
Nothing is written to the table or to variables. The block leaves by its single output after the click; if no element matches, it fails.
Example: Accept the cookie banner and go to the next page of results
- Start
- New tab
- Click element
- Click element
- Get text
- Add a New tab block that opens the first results page, for example
https://shop.example.com/search?q=lamp. - Add a Click element block with Element Selector
button#accept-cookiesand tick Wait for selector, so the banner has time to appear. - Add a second Click element block with Element Selector
//a[contains(., "Next")]. The leading//makes it an XPath. - Tick Wait for selector, set Selector timeout (ms) to
8000, and leave Human Emulation on. - Set Delay time (ms) to
1500,3000so the next page loads before the following block runs.
Good to know
- If no element matches, the block fails with an error that names the selector, and the workflow stops. Set On error in the block's settings to Continue flow or Execute fallback to carry on.
- With Human Emulation on, the block will not click whatever is on top of the element. If a banner or overlay covers it, the block fails after a few attempts and names what is in the way; close the overlay first.
- To open rows one at a time in a loop, set Element Selector to a CSS selector for the rows, such as
.inbox-row, and tick Mark element. Each pass clicks the first row this block has not clicked yet. When every row is tagged, the block fails with its not-found error, which you can use to leave the loop.
See also
- Hover element — Move the pointer over an element, to open a menu or show a tooltip.
- Element exists — Check whether an element is on the page and continue by one of two outputs.
- Forms — Fill a text field, choose a dropdown option, or tick a checkbox or radio button.