Skip to main content

Overview

The Type node enters text into input fields, textareas, and contenteditable elements. It supports multiple input methods including instant fill, character-by-character typing, and direct DOM manipulation.

Input Methods

fill (Default)

Instantly fills the input field after clearing existing content. This is the fastest method and works for most cases.
inputMethod
string
default:"fill"
Set to fill for instant input.

type

Types text character by character, triggering keyboard events. Useful for inputs with event listeners.
inputMethod
string
Set to type for character-by-character typing.
delay
number
default:"0"
Delay in milliseconds between keystrokes.
clearFirst
boolean
default:"false"
Clear field before typing.

pressSequentially

Similar to type but with more explicit control over delays.

append

Appends text to existing field value without clearing.

prepend

Prepends text before existing field value.

direct

Sets value directly via DOM without triggering Playwright events. Fastest but may not trigger framework-specific listeners.

Configuration

selector
string
required
Element selector for the input field. Supports variable interpolation: ${data.fieldSelector}
text
string
required
Text to type into the field. Supports variable interpolation: ${data.username}
selectorType
string
default:"css"
Type of selector: css, xpath, text, getByRole, getByLabel, getByPlaceholder, etc.
selectorModifiers
object
Advanced selector modifiers.Properties:
  • nth: Select nth element
  • filterText: Filter by text content
  • filterSelector: Filter by child selector
  • chainSelector: Scoped sub-query
timeout
number
default:"30000"
Maximum time in milliseconds to wait for the element.
failSilently
boolean
default:"false"
If true, errors don’t stop workflow execution.

Advanced Features

Waiting

waitForSelector
string
Wait for another element before/after typing.
waitForUrl
string
Wait for URL to match pattern.
waitForCondition
string
Wait for JavaScript condition to be true.
waitAfterOperation
boolean
default:"false"
Execute waits after typing instead of before.

Retry Logic

retryEnabled
boolean
default:"false"
Enable automatic retry on failure.
retryCount
number
default:"3"
Number of retry attempts.
retryDelay
number
default:"1000"
Delay between retries in milliseconds.

Examples

Basic Typing

{
  "type": "type",
  "data": {
    "selector": "input#username",
    "text": "[email protected]",
    "inputMethod": "fill"
  }
}

Character-by-Character

{
  "type": "type",
  "data": {
    "selector": "#search-input",
    "text": "automation testing",
    "inputMethod": "type",
    "delay": 100
  }
}

Append and Prepend

{
  "type": "type",
  "data": {
    "selector": "input#notes",
    "text": " - Updated on 2024-01-15",
    "inputMethod": "append"
  }
}

Direct DOM Manipulation

Fast Input
{
  "type": "type",
  "data": {
    "selector": "input.bulk-data",
    "text": "Large amount of text that needs to be inserted quickly",
    "inputMethod": "direct"
  }
}

With Wait Conditions

{
  "type": "type",
  "data": {
    "selector": "input#dynamic-field",
    "text": "[email protected]",
    "waitForSelector": ".form-loaded",
    "waitForSelectorTimeout": 5000
  }
}

With Retry Logic

Resilient Input
{
  "type": "type",
  "data": {
    "selector": "input.slow-to-load",
    "text": "important data",
    "retryEnabled": true,
    "retryCount": 3,
    "retryDelay": 2000,
    "retryDelayStrategy": "exponential"
  }
}

Input Method Comparison

MethodSpeedEventsUse Case
fillFastestBasicStandard forms
typeSlowFull keyboardEvent-driven inputs
pressSequentiallySlowFull keyboardAutocomplete, validation
appendFastBasicAdd to existing text
prependFastBasicAdd before existing text
directFastestNoneBulk data, testing

Notes

The fill method is recommended for most use cases as it’s fast and reliable. Use type when you need to trigger keyboard events.
The direct input method sets values via DOM and may not trigger framework-specific event listeners (React onChange, Vue v-model, etc.).
When using append or prepend, the existing field value is preserved and the new text is added to it.

Common Patterns

Form Fill Sequence

[
  {
    "type": "type",
    "data": {
      "selector": "#email",
      "text": "${data.email}"
    }
  },
  {
    "type": "type",
    "data": {
      "selector": "#password",
      "text": "${data.password}"
    }
  },
  {
    "type": "action",
    "data": {
      "action": "click",
      "selector": "button[type='submit']"
    }
  }
]

Autocomplete Pattern

{
  "selector": "input#autocomplete",
  "text": "search term",
  "inputMethod": "type",
  "delay": 100,
  "waitForSelector": ".autocomplete-dropdown",
  "waitAfterOperation": true
}

Build docs developers (and LLMs) love