arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Capture a Full-Height Screenshot

An example request that uses Gaffa to dismiss a modal, scroll to the bottom of a page and then capture a full height screenshot.

The following example is a request we've prebuilt to show you Gaffa's capabilities on our demo site.arrow-up-right You can run this request right now in the Gaffa API Playgroundarrow-up-right.

Gaffa can also capture screenshots at any point during your interaction for use in your app or to work out exactly what was shown at a given time. You can capture just what is shown, as if you were looking at the screen or the full height of the page.

hashtag
API Request

The request below uses the to open the demo site on the ecommerce page with 20 items, wait for and dismiss the dialog, scroll to the bottom of the page, and capture a full height screenshot.

hashtag
Actions

hashtag
Response

The full-height export screenshot of the page showing all items.

POST endpoint
Waitchevron-right
Clickchevron-right
Scrollchevron-right
Capture Screenshotchevron-right
Gaffa's full height screenshot
{
  "url": "https://demo.gaffa.dev/simulate/ecommerce?loadTime=3&showModal=true&modalDelay=0&itemCount=20",
  "proxy_location": null,
  "async": false,
  "max_cache_age": 0,
  "settings": {
    "record_request": false,
    "actions": [
      {
        "type": "wait",
        "selector": "div[role=\"dialog\"]",
        "timeout": 10000
      },
      {
        "type": "click",
        "selector": "[data-testid=\"accept-all-button\"]"
      },
      {
        "type": "wait",
        "selector": "[data-testid^=\"product-1\"]",
        "timeout": 5000
      },
      {
        "type": "scroll",
        "percentage": 100
      },
      {
        "type": "capture_screenshot",
        "size": "fullscreen"
      }
    ]
  }
}