schickling/chromeless is tracked by TopGit as an automation project, with 13.2k stars on GitHub, written primarily in TypeScript. π₯ Chrome automation made simple. Runs locally or headless on AWS Lambda.
Snapshot summary built from the project's own GitHub metadata β there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then β see the READ ME tab for the original README in full.
This project is deprecated in favor for Puppeteer.
Thanks to all the contributors who made this project possible.
Chromeless
Chrome automation made simple. Runs locally or headless on AWS Lambda. (See Demo)
Chromeless can be used to...
Run 1000s of browser integration tests in parallel β‘οΈ
Crawl the web & automate screenshots
Write bots that require a real browser
Do pretty much everything you've used PhantomJS, NightmareJS or Selenium for before
Examples
JSON of Google Results: Google for chromeless and get a list of JSON results
Screenshot of Google Results: Google for chromeless and take a screenshot of the results
prep: Compile-time prerendering for SPA/PWA (like React, Vue...) instead of server-side rendering (SSR)
See the full examples list for more
βΆοΈ Try it out
You can try out Chromeless and explore the API in the browser-based demo playground (source).
Contents
How it works
Installation
Usage
API Documentation
Configuring Development Environment
FAQ
Contributors
Credits
Help & Community
How it works
With Chromeless you can control Chrome (open website, click elements, fill out forms...) using an elegant API. This is useful for integration tests or any other scenario where you'd need to script a real browser.
There are 2 ways to use Chromeless
Running Chrome on your local computer
Running Chrome on AWS Lambda and controlling it remotely
1. Local Setup
For local development purposes where a fast feedback loop is necessary, the easiest way to use Chromeless is by controlling your local Chrome browser. Just follow the usage guide to get started.
2. Remote Proxy Setup
You can also run Chrome in headless-mode on AWS Lambda. This way you can speed up your tests by running them in parallel. (In Graphcool's case this decreased test durations from ~20min to a few seconds.)
Chromeless comes out of the box with a remote proxy built-in - the usage stays completely the same. This way you can write and run your tests locally and have them be executed remotely on AWS Lambda. The proxy connects to Lambda through a Websocket connection to forward commands and return the evaluation results.
Installation
npm install chromeless
Proxy Setup
The project contains a Serverless service for running and driving Chrome remotely on AWS Lambda.
Deploy The Proxy service to AWS Lambda. More details here
Follow the usage instructions here.
Usage
Using Chromeless is similar to other browser automation tools. For example:
const { Chromeless } = require('chromeless')
async function run() {
const chromeless = new Chromeless()
const screenshot = await chromeless
.goto('https://www.google.com')
.type('chromeless', 'input[name="q"]')
.press(13)
.wait('#resultStats')
.screenshot()
console.log(screenshot) // prints local file path or S3 url
await chromeless.end()
}
run().catch(console.error.bind(console))
Local Chrome Usage
To run Chromeless locally, you need a recent version of Chrome or Chrome Canary installed (version 60 or greater). By default, chromeless will start Chrome automatically and will default to the most recent version found on your system if there's multiple. You can override this behavior by starting Chrome yourself, and passing a flag of launchChrome: false in the Chromeless constructor.
To launch Chrome yourself, and open the port for chromeless, follow this example:
alias canary="/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary"
canary --remote-debugging-port=9222
cd "C:\Program Files (x86)\Google\Chrome\Application"
chrome --remote-debugging-port=9222 --disable-gpu --headless
Proxy Usage
Follow the setup instructions here.
Then using Chromeless with the Proxy service is the same as running it locally with the exception of the remote option.
Alternatively you can configure the Proxy service's endpoint with environment variables. Here's how.
Now your local chromeless scripts will use your local development of chromeless.
FAQ
How is this different from NightmareJS, PhantomJS or Selenium?
The Chromeless API is very similar to NightmareJS as their API is pretty awesome. The big difference is that Chromeless is based on Chrome in headless-mode, and runs in a serverless function in AWS Lambda. The advantage of this is that you can run hundreds of browsers in parallel, without having to think about parallelisation. Running integration Tests for example is much faster.
I'm new to AWS Lambda, is this still for me?
You still can use this locally without Lambda, so yes. Besides that, here is a simple guide on how to set the lambda function up for Chromeless.
How much does it cost to run Chromeless in production?
The compute price is $0.00001667 per GB-s and the free tier provides 400,000 GB-s. The request price is $0.20 per 1 million requests and the free tier provides 1M requests per month.
This means you can easily execute > 100.000 tests for free in the free tier.
Are there any limitations?
If you're running Chromeless on AWS Lambda, the execution cannot take longer than 5 minutes which is the current limit of Lambda. Besides that, every feature that's supported in Chrome is also working with Chromeless. The maximal number of concurrent function executions is 1000. AWS API Limits
Are there commercial options?
Although Chromeless is the easiest way to get started running Chrome on Lambda, you may not have time to build and manage your own visual testing toolkit. Commercial options include:
Chromatic: Visual snapshot regression testing for Storybook.
Troubleshooting
Error: Unable to get presigned websocket URL and connect to it.
In case you get an error like this when running the Chromeless client:
{ HTTPError: Response code 403 (Forbidden)
at stream.catch.then.data (/code/chromeless/node_modules/got/index.js:182:13)
at process._tickDomainCallback (internal/process/next_tick.js:129:7)
name: 'HTTPError',
...
Error: Unable to get presigned websocket URL and connect to it.
Make sure that you're running at least version 1.19.0 of serverless. It is a known issue, that the API Gateway API keys are not setup correctly in older Serverless versions. Best is to run npm run deploy within the project as this will use the local installed version of serverless.
Resource ServerlessDeploymentBucket does not exist for stack chromeless-serverless-dev
In case the deployment of the serverless function returns an error like this:
Serverless Error ---------------------------------------
Resource ServerlessDeploymentBucket does not exist for stack chromeless-serverless-dev
Please check, that there is no stack with the name chromeless-serverless-dev existing yet, otherwise serverless can't correctly provision the bucket.
No command gets executed
In order for the commands to be processed, make sure, that you call one of the commands screenshot, evaluate, cookiesGetAll or end at the end of your execution chain.
Contributors
A big thank you to all contributors and supporters of this repository π
Credits
chrome-remote-interface: Chromeless uses this package as an interface to Chrome
serverless-chrome: Compiled Chrome binary that runs on AWS Lambda (Azure and GCP soon, too.)
NightmareJS: We draw a lot of inspiration for the API from this great tool
Help & Community
Join our Slack community if you run into issues or have questions. We love talking to you!
How active is development on schickling/chromeless?
The most recent commit recorded on schickling/chromeless was 7.8 years ago, based on the GitHub push timestamp. The repository has 569 forks β one of the better signals of community interest.
How many stars does schickling/chromeless have?
schickling/chromeless has 13.2k GitHub stars β refresh the page for the live number, or check github.com/schickling/chromeless. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is schickling/chromeless written in?
schickling/chromeless is written primarily in TypeScript. GitHub's language field is based on the largest share of bytes in the default branch.
What license does schickling/chromeless use?
schickling/chromeless is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms β license strings can be edited out of sync with a project's actual stance.
What topics is schickling/chromeless associated with?
GitHub's repository topics for schickling/chromeless: "chrome", "graphcool", "headless", "headless-chrome", "integration-testing", "nightmarejs", "selenium", "serverless". TopGit's editorial category is Automation.
Where can I see schickling/chromeless in action?
The project maintains a homepage at https://chromeless.netlify.com. The README tab on this page also usually contains screenshots and a quickstart.
Where do I read more about schickling/chromeless?
This TopGit page is a snapshot β the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/schickling/chromeless is the definitive source.
Read full README in the tab above.
Still deciding about chromeless?
One click hands the question to an AI along with this page β see what it says about chromeless.