Skip to content

Browser Action Types Reference

Complete reference for all action types available in the actions: list of a browser: resource.

Each item in the actions list requires an action field that selects the operation.


Navigate to a URL mid-sequence.

yaml
# resources/example.yaml
- action: navigate
  url: "https://example.com/login"
FieldDescription
urlURL to navigate to. Also accepted via the value field.

click

Click on an element.

yaml
# resources/example.yaml
- action: click
  selector: "#submit-button"
FieldDescription
selectorRequired. CSS selector of the element to click.

fill

Fill a text input field (replaces existing content atomically).

yaml
# resources/example.yaml
- action: fill
  selector: "#email"
  value: "user@example.com"
FieldDescription
selectorRequired. CSS selector of the input field.
valueText to fill in.

type

Type text character-by-character (useful for fields with key handlers).

yaml
# resources/example.yaml
- action: type
  selector: "#search"
  value: "my query"
FieldDescription
selectorRequired. CSS selector of the element.
valueText to type.

upload

Upload one or more local files to a file input element.

yaml
# resources/example.yaml
- action: upload
  selector: "#file-input"
  files:
    - /tmp/report.pdf
    - /tmp/image.png
FieldDescription
selectorRequired. CSS selector of the <input type="file"> element.
filesRequired. List of absolute file paths to upload.

select

Choose an option in a <select> dropdown by value.

yaml
# resources/example.yaml
- action: select
  selector: "#country"
  value: "US"
FieldDescription
selectorRequired. CSS selector of the <select> element.
valueThe value attribute of the option to select.

check

Check a checkbox or radio button.

yaml
# resources/example.yaml
- action: check
  selector: "#agree-terms"
FieldDescription
selectorRequired. CSS selector of the checkbox.

uncheck

Uncheck a checkbox.

yaml
# resources/example.yaml
- action: uncheck
  selector: "#newsletter"
FieldDescription
selectorRequired. CSS selector of the checkbox.

hover

Hover the mouse cursor over an element (useful for triggering tooltips / menus).

yaml
# resources/example.yaml
- action: hover
  selector: ".dropdown-trigger"
FieldDescription
selectorRequired. CSS selector of the element.

scroll

Scroll the page or scroll a specific element into view.

yaml
# Scroll the page down by 500 pixels
- action: scroll
  value: "500"

# Scroll a specific element into view
- action: scroll
  selector: "#footer"
FieldDescription
selector(Optional) Scroll this element into view.
valuePixel offset for page scrolling when no selector is given.

press

Press a keyboard key, optionally scoped to a focused element.

yaml
# Press Enter on a focused element
- action: press
  selector: "#search-input"
  key: "Enter"

# Press a global key (no selector)
- action: press
  key: "Escape"
FieldDescription
selector(Optional) Element to press the key on.
keyKey name (e.g. Enter, Tab, Escape, ArrowDown). Also accepted via value.

clear

Clear the contents of a text input field.

yaml
# resources/example.yaml
- action: clear
  selector: "#notes"
FieldDescription
selectorRequired. CSS selector of the input to clear.

evaluate

Execute a JavaScript expression and capture the return value.

yaml
# resources/example.yaml
- action: evaluate
  script: "document.title"
FieldDescription
scriptRequired. JavaScript expression or statement to execute.

The return value is stored in the resource output and accessible via get().


screenshot

Capture a screenshot of the full page or a specific element.

yaml
# Full page screenshot
- action: screenshot
  outputFile: /tmp/page.png
  fullPage: true

# Element screenshot
- action: screenshot
  selector: "#chart"
  outputFile: /tmp/chart.png
FieldDescription
outputFileFile path for the PNG image. Auto-generated under /tmp/kdeps-browser/ if omitted.
fullPageCapture the full scrollable page (true/false). Default: false.
selector(Optional) Capture only this element.

wait

Pause execution for a duration or until a CSS selector appears.

yaml
# Wait for a fixed duration
- action: wait
  wait: "500ms"

# Wait until an element is visible
- action: wait
  selector: ".loading-spinner"
FieldDescription
waitDuration string (e.g. "500ms", "2s") or CSS selector.
selectorCSS selector to wait for when wait is not set.
valueFallback: duration or selector when neither wait nor selector is set.

See Also

Released under the Apache 2.0 License.