Gaffa
  • Introduction
  • Get Started
  • Credits and Pricing
  • Changelog
  • Features
    • Browser Requests
      • Actions
        • Capture DOM
        • Capture Screenshot
        • Capture Snapshot
        • Click
        • Generate Markdown
        • Generate Simplified DOM
        • Print
        • Scroll
        • Type
        • Wait
      • API Playground Examples
        • Export Web Page to PDF
        • Convert Web Page to Markdown
        • Infinitely Scroll an Ecommerce Site
        • Capture a Full Height Screenshot
        • Automated Form Filling
  • API Reference
    • API Authentication
    • POST v1/browser/request
    • GET v1/browser/request/{id}
    • GET v1/browser/requests
Powered by GitBook
On this page
  • Parameters
  • Usage
Export as PDF
  1. Features
  2. Browser Requests
  3. Actions

Wait

PreviousTypeNextAPI Playground Examples

Last updated 3 months ago

Type: wait

Request that the browser waits a given amount of time or for a particular item to appear on the page.

Parameters

Name
Type
Required
Description

time

integer

The time in milliseconds that the browser should wait.

selector

string

timeout

integer

The maximum amount of time the browser should wait for the provided selector to appear. Default: 5,000 (5s)

See .

Usage

Wait for a particular amount of time

The following code will wait 1 second and then continue with the next action, if provided.

"actions": [
      {
        "name": "wait",
        "time": 1000,
      }
]

Wait for a particular element to appear

The following code will wait for a table to appear on the page for a maximum of 5 seconds. If the table has not appeared after 5 seconds the next action will be executed, if provided.

"actions": [
      {
        "name": "wait",
        "selector": "table",
        "timeout": 5000,
        "continueOnFail": true
      }
]

The that defines the page element that the browser should wait to appear.

selector
universal parameters