> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spurtest.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Type

> Enter text into input fields, search boxes, and other text elements.

## Overview

The type action enters text into form fields, search boxes, and other text input elements.

## Default Behavior

By default, the agent will:

1. Clear any existing text in the target field
2. Type the specified text
3. Wait for the text to be fully entered

<Note>
  The agent handles all these steps in a single action.
</Note>

## Syntax Variations

### Basic Typing

Clears existing text and types new text into the target field.

<Frame caption="Basic typing into a field">
  <img src="https://mintcdn.com/spur/SU7JWaNfJJg63kTF/images/Type/type_ex_1.png?fit=max&auto=format&n=SU7JWaNfJJg63kTF&q=85&s=3429f504c5eafd3a413bcb6438bbada8" alt="" width="1048" height="122" data-path="images/Type/type_ex_1.png" />
</Frame>

### Type with Enter

Types text and simulates an Enter key press to submit.

<Frame caption="Typing text and pressing Enter">
  <img src="https://mintcdn.com/spur/SU7JWaNfJJg63kTF/images/Type/type_ex_2.png?fit=max&auto=format&n=SU7JWaNfJJg63kTF&q=85&s=497c3bbd92b044f70bdf0d74ad033c00" alt="" width="1030" height="120" data-path="images/Type/type_ex_2.png" />
</Frame>

### Explicit Clear

Explicitly clears the field before typing new text.

<Frame caption="Clear and type into a specific field">
  <img src="https://mintcdn.com/spur/SU7JWaNfJJg63kTF/images/Type/type_ex_3.png?fit=max&auto=format&n=SU7JWaNfJJg63kTF&q=85&s=2f2739adbea3936fba6b86cdacf0ed5e" alt="" width="1048" height="124" data-path="images/Type/type_ex_3.png" />
</Frame>

### Preserve Existing Text

Appends text to the field without clearing what is already there.

<Frame caption="Appending text without clearing">
  <img src="https://mintcdn.com/spur/SU7JWaNfJJg63kTF/images/Type/type_ex_4.png?fit=max&auto=format&n=SU7JWaNfJJg63kTF&q=85&s=29f3865623e571224ebee1ff1d92aa38" alt="" width="1046" height="120" data-path="images/Type/type_ex_4.png" />
</Frame>

## Best Practices

* Clearly specify the target field using its label or placeholder text
* Use descriptive field names that match what is visible on the page
* Consider whether existing text should be cleared or preserved
* Mention if an Enter key press is needed after typing
