FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...


v0.5.0 Public


A CFML wrapper for the browserless API. Control web browser automation for screenshots, pdf generation, testing, and more.

Feel free to use the issue tracker to report bugs or suggest improvements!

This was quickly put together for a side project. It isn't meant to be comprehensive or complete. Just a starting point, if people are interested in messing around with the API via CFML.


This project borrows heavily from the API frameworks built by jcberquist. Thanks to John for all the inspiration!

Table of Contents

Quick Start

The following is a quick example of taking a screenshot (the only method that's currently implemented), using the screenshot helper component.

browserless = new apiKey = 'xxx' );

options = new
  .url( "" )
  .fullPage( false )
  .type( "jpeg" )
  .quality( 75 )
  .viewportHeight( 940 )
  .viewportWidth( 1680 );

flags = {
    "--window-size": "1680,940",
    "stealth": true

jpg = browserless.screenshot( options, flags );

writeDump( var='#jpg#', abort='true' );

Setup and Authentication

To get started with the API, you'll need an API Token.

Once you have this, you can provide it to this wrapper manually when creating the component, as in the Quick Start example above, or via an environment variable named BROWSERLESS_API_KEY, which will get picked up automatically. This latter approach is generally preferable, as it keeps hardcoded credentials out of your codebase.

Reference Manual

screenshot( required any options, struct flags={} )

Take a screenshot. The parameter options expects an instance of the helpers.screenshot component, but you can construct the struct/json yourself if you prefer. Additionally, for flexibility, you can simply pass in a url. Endpoint docs

Reference Manual for helpers.screenshot

The reference manual for all public methods in helpers/screenshot.cfc can be found in the docs directory, in

Unless indicated, all methods are chainable. To better understand how these work, you'll want to read the documentation regarding the /screenshot endpoint as well as the generated Swagger UI for the endpoint.

Dependencies (0)

Dev Dependencies (0)

$ box install browserlesscfc

No collaborators yet.
  • {{ getFullDate("Jul 07 2021 01:07 PM GMT") }}
  • {{ getFullDate("Jul 07 2021 01:07 PM GMT") }}
  • 447
  • 0
  • 2