
Selenium Browse
CertifiedAutomate a browser session
Selenium Browse
Automate a browser session
Opens a single WebDriver session against a Selenium Grid, executes a list of actions sequentially, then closes the session. Supports navigation, clicking, typing, waiting for elements, extracting text, taking screenshots, running JavaScript, and downloading files via Selenium Grid managed downloads.
type: io.kestra.plugin.selenium.BrowseExamples
Navigate to example.com and extract the heading text.
id: selenium_browse
namespace: company.team
tasks:
- id: browse
type: io.kestra.plugin.selenium.Browse
remoteUrl: "{{ secret('SELENIUM_GRID_URL') }}"
actions:
- action: NAVIGATE
url: "https://example.com"
- action: EXTRACT_TEXT
id: heading
selector: "h1"
- action: SCREENSHOT
name: "result.png"
Download a file by clicking a link and storing it in Kestra internal storage.
id: selenium_download
namespace: company.team
tasks:
- id: browse
type: io.kestra.plugin.selenium.Browse
remoteUrl: "{{ secret('SELENIUM_GRID_URL') }}"
actions:
- action: NAVIGATE
url: "https://the-internet.herokuapp.com/download"
- action: WAIT_FOR
selector: ".example a"
- action: DOWNLOAD
selector: ".example a:first-of-type"
Properties
actions *array
1Actions
Ordered list of browser actions to execute within a single session.
io.kestra.plugin.selenium.Browse-Action
NAVIGATECLICKTYPEWAIT_FOREXTRACT_TEXTSCREENSHOTEXECUTE_SCRIPTDOWNLOADAction type
The browser action to perform. One of: NAVIGATE (go to a URL), CLICK (click an element by CSS selector), TYPE (type text into an element), WAIT_FOR (wait until an element is present), EXTRACT_TEXT (read text from element(s)), SCREENSHOT (capture the viewport), EXECUTE_SCRIPT (run JavaScript and capture the return value), DOWNLOAD (fetch files from the Selenium Grid node into Kestra internal storage; if selector is set, waits for it to be clickable and clicks it to trigger the download; trigger downloads through this selector, not a separate CLICK action; requires the Grid node to have managed downloads enabled, SE_NODE_ENABLE_MANAGED_DOWNLOADS=true).
Clear before typing
When true, TYPE clears the element's existing value before sending keys. Defaults to false.
PRESENTVISIBLECLICKABLEWait condition
Element state to wait for in WAIT_FOR: PRESENT (exists in the DOM), VISIBLE (also displayed), or CLICKABLE (visible and enabled). Defaults to PRESENT.
Output key
Key under which EXTRACT_TEXT or EXECUTE_SCRIPT results are stored in the output.
Multiple
When true, EXTRACT_TEXT returns a list of texts from all matching elements. Defaults to false.
Screenshot filename
Output filename for SCREENSHOT. Defaults to screenshot_
JavaScript
Script body for EXECUTE_SCRIPT. The return value is captured in the output.
CSS selector
CSS selector for CLICK, TYPE, WAIT_FOR, EXTRACT_TEXT, and DOWNLOAD.
URL
Target URL for NAVIGATE.
Value
Text to type into the element for TYPE.
Wait timeout
Maximum time to wait for the target element or file. Applies to CLICK and TYPE (element clickable, default PT10S), WAIT_FOR (default PT10S), EXTRACT_TEXT (element visible when multiple is false, presence of at least one element when true, default PT10S), and DOWNLOAD (its own selector's element clickable, then the new stable file, both using the same value, default PT30S).
remoteUrl *string
Selenium Grid or WebDriver endpoint
URL of the remote WebDriver, e.g. http://localhost: 4444.
Security note: the Grid node will open any URL passed to a NAVIGATE action, including addresses reachable only from the Grid host's network (internal services, cloud metadata endpoints, etc.). Restrict Grid egress with network policy when running in shared or multi-tenant environments.
browser string
CHROMEFIREFOXEDGEBrowser
Browser to use. One of CHROME, FIREFOX, EDGE. Defaults to CHROME.
capabilities object
Extra capabilities
Additional browser capabilities merged into the options before the session is created. Values are passed unvalidated to the browser and Grid; only set these from trusted sources.
headless booleanstring
Headless
Run browser without a display. Defaults to true.
maxOutputSize integerstring
1048576Maximum output size
Upper bound, in bytes, on the combined JSON-serialized size of extracted and scriptResults
accumulated so far. Checked after each EXTRACT_TEXT and EXECUTE_SCRIPT action; exceeding it fails
the task instead of growing the output further. Defaults to 1048576 (1 MB). Use SCREENSHOT or a
narrower selector to capture large content instead, or raise this value if larger output is expected.
pageLoadTimeout string
Page load timeout
Maximum time to wait for a page to load. Defaults to PT30S.
password string
Grid password
Password for HTTP basic auth against the Grid endpoint, if required. Must be set together with username.
username string
Grid username
Username for HTTP basic auth against the Grid endpoint, if required. Must be set together with password.
Outputs
downloads object
{}Downloads
Internal storage URIs of files fetched by DOWNLOAD actions, keyed by the original filename.
extracted object
{}Extracted texts
Text values captured by EXTRACT_TEXT actions, keyed by id or extract_
screenshots object
{}Screenshots
Internal storage URIs of screenshots, keyed by filename.
scriptResults object
{}Script results
Return values from EXECUTE_SCRIPT actions, keyed by id or script_