Skip to content

Step Types

Complete reference for all 20 step types available in SideButton.

Browser Steps

browser.navigate

Navigate to a URL.

yaml
- type: browser.navigate
  url: "https://example.com"
  new_tab: false  # Optional: open in new tab
ParameterTypeRequiredDescription
urlstringYesURL to navigate to
new_tabbooleanNoOpen in new tab (default: false)

browser.click

Click an element.

yaml
- type: browser.click
  selector: "button.submit"
  new_tab: false  # Optional: Ctrl+click to open in new tab
ParameterTypeRequiredDescription
selectorstringYesCSS selector or text selector
new_tabbooleanNoCtrl+click for new tab

Selector formats:

  • CSS: button.submit, #login-btn
  • Text: button:has-text('Submit')
  • Aria: [aria-label="Close"]

browser.type

Type text into an input.

yaml
- type: browser.type
  selector: "input[name='email']"
  text: "user@example.com"
ParameterTypeRequiredDescription
selectorstringYesCSS selector for input
textstringYesText to type

browser.scroll

Scroll the page.

yaml
- type: browser.scroll
  direction: down
  amount: 500  # pixels
ParameterTypeRequiredDescription
directionstringYesup, down, left, right
amountnumberNoPixels to scroll (default: 300)

Scroll in containers

Use browser.hover first to position the cursor inside a scrollable container.

browser.hover

Hover over an element.

yaml
- type: browser.hover
  selector: ".dropdown-menu"
ParameterTypeRequiredDescription
selectorstringYesCSS selector

browser.wait

Wait for element or delay.

yaml
# Wait for element
- type: browser.wait
  selector: ".loading-complete"
  timeout: 10000

# Fixed delay
- type: browser.wait
  ms: 2000
ParameterTypeRequiredDescription
selectorstringNoWait for element to appear
msnumberNoFixed delay in milliseconds
timeoutnumberNoMax wait time (default: 30000)

browser.extract

Extract text from an element.

yaml
- type: browser.extract
  selector: "h1"
  as: page_title
ParameterTypeRequiredDescription
selectorstringYesCSS selector
asstringYesVariable name to store result

browser.extractAll

Extract text from multiple elements.

yaml
- type: browser.extractAll
  selector: ".list-item"
  as: items
  separator: ", "  # Optional
ParameterTypeRequiredDescription
selectorstringYesCSS selector
asstringYesVariable name
separatorstringNoJoin separator (default: ", ")

browser.exists

Check if element exists.

yaml
- type: browser.exists
  selector: ".error-message"
  as: has_error
  timeout: 1000
ParameterTypeRequiredDescription
selectorstringYesCSS selector
asstringYesVariable name (boolean)
timeoutnumberNoWait timeout (default: 1000)

browser.key

Send keyboard key.

yaml
- type: browser.key
  key: Enter
  selector: "input.search"  # Optional: focus first
ParameterTypeRequiredDescription
keystringYesKey name
selectorstringNoElement to focus first

Supported keys: Escape, Enter, Tab, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Backspace, Delete, Space

Shell Steps

shell.run

Execute a shell command.

yaml
- type: shell.run
  cmd: "echo 'Hello World'"
  cwd: "/path/to/dir"  # Optional
  as: output          # Optional
ParameterTypeRequiredDescription
cmdstringYesCommand to run
cwdstringNoWorking directory
asstringNoVariable for stdout

terminal.open

Open a visible terminal window (macOS).

yaml
- type: terminal.open
  title: "My Terminal"
  cwd: "/path/to/project"
ParameterTypeRequiredDescription
titlestringNoTerminal window title
cwdstringNoStarting directory

terminal.run

Run command in open terminal.

yaml
- type: terminal.run
  cmd: "npm run dev"
ParameterTypeRequiredDescription
cmdstringYesCommand to run

LLM Steps

Requires API Key

Set OPENAI_API_KEY environment variable or configure in Settings.

llm.classify

Classify text into categories.

yaml
- type: llm.classify
  input: "{{message}}"
  categories:
    - urgent
    - normal
    - spam
  as: category
ParameterTypeRequiredDescription
inputstringYesText to classify
categoriesarrayYesList of categories
asstringYesVariable for result

llm.generate

Generate text with AI.

yaml
- type: llm.generate
  prompt: "Summarize this article:\n{{content}}"
  as: summary
ParameterTypeRequiredDescription
promptstringYesPrompt for the LLM
asstringYesVariable for result

Control Flow Steps

control.if

Conditional branching.

yaml
- type: control.if
  condition: "{{status}} == 'ready'"
  then:
    - type: browser.click
      selector: ".start-btn"
  else_steps:
    - type: control.stop
      message: "Not ready"
ParameterTypeRequiredDescription
conditionstringYesCondition to evaluate
thenarrayYesSteps if true
else_stepsarrayNoSteps if false

Operators: ==, !=

control.retry

Retry steps on failure.

yaml
- type: control.retry
  max_attempts: 3
  delay_ms: 1000
  steps:
    - type: browser.click
      selector: ".flaky-button"
ParameterTypeRequiredDescription
stepsarrayYesSteps to retry
max_attemptsnumberNoMax retries (default: 3)
delay_msnumberNoDelay between retries (default: 1000)

control.stop

Stop workflow execution.

yaml
- type: control.stop
  message: "Completed successfully"
ParameterTypeRequiredDescription
messagestringNoMessage to log

Workflow Steps

workflow.call

Call another workflow.

yaml
- type: workflow.call
  workflow: extract_data
  params:
    url: "{{target_url}}"
  as: data  # Namespace for child variables
ParameterTypeRequiredDescription
workflowstringYesWorkflow ID to call
paramsobjectNoParameters to pass
asstringNoNamespace for variables

Data Steps

data.first

Get first item from a list.

yaml
- type: data.first
  input: "{{items}}"
  as: first_item
  separator: ", "
ParameterTypeRequiredDescription
inputstringYesComma-separated list
asstringYesVariable for first item
separatorstringNoList separator (default: ", ")

Released under the Apache-2.0 License.