Paste

paste Function

The paste function allows you quickly paste a string into an input field. 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": [{
            "paste": {
                "selector": "input[type='\''search'\'']",
                "timeout": 20000,
                "delay": 500,
                "value": "eggplant",
                "click_on_element": true,
                "visible": false
        }
    }]
}'

Last updated