Taking Screenshots and downloading files
Taking screenshots
Browserbase enables screen view and full-screen screenshots using your desired browser automation framework with the following configuration:
Screenshot type | DPI | Format |
---|---|---|
Screen view (default) | 80 | jpeg |
Full-screen | 90 | jpeg |
Save a screenshot locally
A Screenshot taken with Browserbase can be saved locally as a file:
Downloading files
A typical use-case for using headless browsers includes downloading files from web pages. Our browsers are configured to sync any file you download to our storage infrastructure.
Follow the steps to download files:
-
Use the Create Session API to create a new session. You’ll need the session ID for when you connect.
-
Finally, configure your library’s downloads location:
We sync the files in real time; the size of your downloads might affect their
immediate availability through the /downloads
endpoint. The above code
provides a snippet to handle that use case.
Session downloads API
Learn more on the available params and response fields
Was this page helpful?