Skip to main content

Fill text field on web page

Sophie avatar
Written by Sophie
Updated over 2 weeks ago

Definition and Usage

Fill a text field in a web page with the specified text. This command allows you to input text into form fields, search boxes, or any text input element on a webpage, with options to simulate human-like typing or use direct API calls.


Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

Web page

Select a variable that contains the web page to work with

-

Yes

Must be a valid web page object

Element

Select or capture an element to operate on

-

Yes

Use the Capture button to select the target text field

Input type

Select text type

Text, Password

Yes

Input content

Enter the text to fill

-

Yes

The content to be entered into the text field

Append to existing content

When checked, new input appends to existing content; when unchecked, it overwrites existing content

-

No

Press Enter after input

Simulate pressing Enter after input

-

No

Useful for search boxes or form submissions

Press Tab after input

Simulate pressing Tab after input

-

No

Helpful for moving to the next field

Advanced settings

Parameter

Description

Possible Values

Required

Options / Notes

Input type

Trigger input events by simulating user behavior or via API calls

Simulate human input, Input via API calls

Yes

Include Shortcuts

You can include Shortcuts in your input, e.g. {enter} which means pressing the Enter key

No

Only available when "Simulate human input" is selected

Click before input

Click the textbox before entering text

No

Ensures the element is focused before typing

Input Interval (ms)

Set interval between each character input in milliseconds; increase this value if input errors occur

No

Maximum 1000 ms

Focus timeout (ms)

Set focus timeout (ms): Pause for specified duration after element gains focus before starting input

No

Wait after execution (s)

Wait for a specified number of seconds after the action is executed

No

Element timeout (s)

Wait time for element to appear (seconds)

No

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app.

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process.

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption.

Variables produced

This action doesn't produce any variables.


Using Variables in Conditions

You can use variables for any parameter by clicking the {x} icon or inserting a variable reference. This is especially useful for dynamically determining what text to input based on previous steps in your workflow. For example, you might use a variable from a previous web scraping action as the input content for a search field.


Notes

  • Ensure the web page is fully loaded before attempting to fill text fields.

  • If you experience input issues, try increasing the "Input Interval" value in advanced settings.

  • The "Simulate human input" option types characters one by one, mimicking human behavior, while "Input via API calls" is faster but may not trigger all JavaScript events.

  • For password fields, select "Password" as the input type for proper handling.

  • When working with dynamic web applications, you may need to adjust the "Element timeout" to ensure the element is available before attempting to interact with it.

Did this answer your question?