Type

Type: type

Request that the browser type a particular bit of text into a field.

Parameters

NameTypeRequiredDescription

selector

string

The selector that defines the page element that the browser should click on.

text

string

The text the browser should enter into the text field.

timeout

integer

The maximum amount of time the browser should wait for the element that needs to be typed in to appear. Default: 20,000 (20s)

See universal parameters.

Sites that use more advanced bot detection often use keyboard events to detect unusual activity on their site, rather than immediately dropping all characters of the text into a field our platform types the text in a human-like manner.

Usage

Type into a text box

The following action will type into a particular text field.

"actions": [
      {
            "name": "type",
            "selector": "#postform-text",
            "text": "Hello world!"
      }
]

Wait for an element to appear before typing

The following code will wait a maximum of 10 seconds for the email input to appear in the field and then type in the provided email.

"actions": [
      {
         "name": "type",
         "selector": "form input[name="email"]",
         "text": "test@test.com"
         "timeout": 10000
      }
]

Last updated