https://github.com/browserbase/quickstart-playwright-js-parallelism
Run Playwright tasks in parallel with Browserbase
https://github.com/browserbase/quickstart-playwright-js-parallelism
headless-chrome playwright playwright-javascript playwright-typescript
Last synced: 17 days ago
JSON representation
Run Playwright tasks in parallel with Browserbase
- Host: GitHub
- URL: https://github.com/browserbase/quickstart-playwright-js-parallelism
- Owner: browserbase
- License: mit
- Created: 2024-04-25T08:22:45.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-26T21:11:24.000Z (about 1 year ago)
- Last Synced: 2025-06-18T14:44:01.939Z (9 months ago)
- Topics: headless-chrome, playwright, playwright-javascript, playwright-typescript
- Language: TypeScript
- Homepage: https://docs.browserbase.com
- Size: 55.7 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Parallel Playwright tasks with Browserbase
This repo is a template for the [Parallelization Guide](http://docs.browserbase.com/guides/parallelization).
The `processBrowserbaseTasks(tasks)` utility is provided to process multiple Playwright tasks in parallel by leveraging a pool of Browser instances.
## Setup
### 1. Install dependencies and launch TypeScript in watch mode:
```bash
npm install
tsc -w
```
### 2. Get your Browserbase API Key and Project ID:
- [Create an account](https://www.browserbase.com/sign-up) or [log in to Browserbase](https://www.browserbase.com/sign-in)
- Copy your API Key and Project ID [from your Settings page](https://www.browserbase.com/settings)
### 3. Run the script:
```bash
BROWSERBASE_PROJECT_ID=xxx BROWSERBASE_API_KEY=xxxx node dist/index.js
```
## Further reading
- [See how to leverage the Session Debugger for faster development](https://docs.browserbase.com/guides/browser-remote-control#accelerate-your-local-development-with-remote-debugging)
- [Learn more about Browserbase infrastructure](https://docs.browserbase.com/under-the-hood)
- [Explore the Sessions API](https://docs.browserbase.com/api-reference/list-all-sessions)