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

Click

PreviousCapture SnapshotNextGenerate Markdown

Last updated 3 months ago

Type: click

Request that the browser clicks a particular element on the page.

Parameters

Name
Type
Required
Description

selector

string

timeout

integer

The maximum amount of time the browser should wait for the element defined by the selector to appear. Default: 5000 (5s)

See .

Usage

Click an element on the page

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

"actions": [
    {
      "type": "click",
      "selector": "a.header__logo"
    }
]

Wait for a particular element to appear

The following code will wait for the logo to appear for a maximum of 5 seconds and it will continue with the list of actions

"actions": [
      {
        "type": "wait",
        "selector": "a.header__logo",
          "timeout": 5000,
          "continueOnFail": true
      }
]

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

selector
universal parameters