Wait and Type

wait_and_type Function

The wait_and_type function allows you to input text into a specified field after waiting for the field to appear. This function is essential for filling out forms or entering search queries during the scraping process.

Parameter
Required
Description

selector

Required when wait_and_type is being used

String | The selector for the desired element to be typed on

value

Required when wait_and_type is being used

String | the text input to be typed on desured elemnt

timeout

Optional

Integer | Controls the time to allow the type action run in ms

delay

Optional

Integer | The required delay to be added in ms

click_on_element

Optional

Bool | When true, the element would be clicked before typing

visible

Optional

Bool | when true, the request will wait for the element to be present in the DOM and to be visible, i.e. to not have display: none or visibility: hidden CSS properties.

Example Request

curl -X POST 'https://api.webit.live/api/v1/realtime/web' \
--header 'Authorization: Basic <credential string>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "https://www.example.com",
    "render": true,
    "render_flow": [{
            "wait_and_type": {
                "selector": "input[type='\''search'\'']",
                "timeout": 20000,
                "delay": 500,
                "value": "eggplant",
                "click_on_element": true,
                "visible": false
        }
    }]
}'

Like all Page Interactions, infinite scrolling is capped by the global 120-second session timeout, and will be terminated if this limit is reached.

Last updated