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
  • API Request
  • Actions
  • Response
  • Read More
Export as PDF
  1. Features
  2. Browser Requests
  3. API Playground Examples

Automated Form Filling

An example request that uses Gaffa to automate the completion of a form and waits for a success modal to appear.

PreviousCapture a Full Height ScreenshotNextAPI Authentication

Last updated 5 months ago

The following example is a request we've pre-built to show you Gaffa's capabilities against our You can run this request right now in the .

Filling forms is tedious, Gaffa can be used to fill out a form in a human-like manner so you can spend time doing much more interesting things.

API Request

The request below uses the to open the demo site on the form simulator page with some sections pre-filled (for speed). After typing in the required information and clicking submit, Gaffa waits for the success dialog to show before returning a video of the interaction.

{
  "url": "https://demo.gaffa.dev/simulate/form?loadTime=3&showModal=false&modalDelay=0&formType=address&firstName=John&lastName=Doe&address1=123%20Main%20Street&city=London&country=UK",
  "proxy_location": null,
  "async": false,
  "max_cache_age": 0,
  "settings": {
    "record_request": true,
    "actions": [
      {
        "type": "type",
        "selector": "#email",
        "text": "johndoe@example.com"
      },
      {
        "type": "type",
        "selector": "#state",
        "text": "CA"
      },
      {
        "type": "type",
        "selector": "#zipCode",
        "text": "12345"
      },
      {
        "type": "click",
        "selector": "button[type='submit']"
      },
      {
        "type": "wait",
        "selector": "[role=\"dialog\"] h2:has-text(\"Success!\")",
        "timeout": 10000
      }
    ]
  }
}

Actions

Response

Here's a video showing Gaffa filling out the page and waiting for the success modal.

Read More

Read more about screen recording here (TODO).

demo site.
Gaffa API Playground
POST endpoint
Type
Click
Wait
Gaffa can help automatically fill out your forms!