All Projects â†’ playwright-community â†’ heroku-playwright-buildpack

playwright-community / heroku-playwright-buildpack

Licence: other
Buildpack for running Playwright with Chromium and Firefox on Heroku.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to heroku-playwright-buildpack

Recorder
A browser extension that generates Cypress, Playwright and Puppeteer test scripts from your interactions 🖱 ⌨
Stars: ✭ 277 (+714.71%)
Mutual labels:  chromium, playwright
mitm-play
Man in the middle using Playwright
Stars: ✭ 13 (-61.76%)
Mutual labels:  chromium, playwright
crusher
Develop.Test. Ship.🦖 Open source e2 low-code web testing. Blazing fast alternative to Selenium, Cypress.
Stars: ✭ 148 (+335.29%)
Mutual labels:  chromium, playwright
Playwright Python
Python version of the Playwright testing and automation library.
Stars: ✭ 5,583 (+16320.59%)
Mutual labels:  chromium, playwright
playwright-demos
playwright for scrapping and UI testing / automate testing workflows
Stars: ✭ 65 (+91.18%)
Mutual labels:  chromium, playwright
Playwright
Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
Stars: ✭ 31,513 (+92585.29%)
Mutual labels:  chromium, playwright
WebView4Delphi
WebView4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC for Windows.
Stars: ✭ 157 (+361.76%)
Mutual labels:  chromium
docker-node-ci
The Docker image based on the official "node" image optimized for a CI environment
Stars: ✭ 18 (-47.06%)
Mutual labels:  chromium
pupflare
A webpage proxy that request through Chromium (puppeteer) - can be used to bypass Cloudflare anti bot / anti ddos on any application (like curl)
Stars: ✭ 183 (+438.24%)
Mutual labels:  chromium
sippet
C++ SIP stack based on Chromium source code
Stars: ✭ 23 (-32.35%)
Mutual labels:  chromium
Browser
A productivity focused web browser
Stars: ✭ 49 (+44.12%)
Mutual labels:  chromium
raspberry-pi-kiosk
A simple set of commands to set up a raspberry pi for use as a stand alone kiosk screen
Stars: ✭ 45 (+32.35%)
Mutual labels:  chromium
NativeMessaging
C# Chome Native Messaging Library
Stars: ✭ 55 (+61.76%)
Mutual labels:  chromium
cef-mixer
High Performance off-screen rendering (OSR) demo using CEF
Stars: ✭ 183 (+438.24%)
Mutual labels:  chromium
playwright-community
A central home for tutorials, tooling, and showcases of the Playwright ecosystem.
Stars: ✭ 38 (+11.76%)
Mutual labels:  playwright
clusteer
Clusteer is a Puppeteer wrapper written for Laravel, with the super-power of parallelizing pages across multiple browser instances.
Stars: ✭ 81 (+138.24%)
Mutual labels:  chromium
HandyBrowser
A Handshake enabled Chromium web browser and reference client; works with HSD and the HNSD light client. Use our example to build or integrate Handshake into any browser.
Stars: ✭ 101 (+197.06%)
Mutual labels:  chromium
pytest-playwright
Pytest plugin to write Playwright tests with ease. Provides fixtures to have a page instance for each individual test and helpful CLI options for headless browsers.
Stars: ✭ 14 (-58.82%)
Mutual labels:  playwright
ungoogled-chromium-void
Ungoogled Chromium template and builds for Void Linux
Stars: ✭ 35 (+2.94%)
Mutual labels:  chromium
playwright-lighthouse
🎭: Playwright Lighthouse Audit
Stars: ✭ 120 (+252.94%)
Mutual labels:  playwright

Heroku Playwright Buildpack

This buildpack installs all the needed dependencies to use Playwright with Chromium and Firefox on Heroku.

Deploy

Usage

For using this buildpack, you have to add the buildpack before installing your Node.js dependencies.

heroku buildpacks:set https://github.com/mxschmitt/heroku-playwright-buildpack.git -a my-app

For a full example, see here a usage with the Express library.

It's common to use the PLAYWRIGHT_BUILDPACK_BROWSERS environment variable which accepts a comma-separated list of the browser names (chromium, firefox, webkit). By default, it's installing the dependencies for all the browsers. To only install Chromium dependencies for example, just set it to chromium. This will reduce the slug size in the end too.

You should also install the browser specific NPM packages like playwright-chromium. to reduce the slug size.

Examples

Chromium

For using Chromium, it's necessary to use chromiumSandbox: false in the launch options, since on Heroku is no support for the Chromium sandbox.

const { chromium } = require("playwright-chromium");

(async () => {
  const browser = await chromium.launch({ chromiumSandbox: false });
  const context = await browser.newContext();
  const page = await context.newPage();
  await page.goto('http://whatsmyuseragent.org/');
  await page.screenshot({ path: `chromium.png` });
  await browser.close();
})();

Firefox

For Firefox, you can refer to the official examples, no need to adjust any configurations.

const { firefox } = require("playwright-firefox");

(async () => {
  const browser = await chromium.launch();
  const context = await browser.newContext();
  const page = await context.newPage();
  await page.goto('http://whatsmyuseragent.org/');
  await page.screenshot({ path: `firefox.png` });
  await browser.close();
})();

Best practises

It's common to only install the browser-specific NPM packages, which will reduce installation time and slug size on Heroku in the end, that should fix also the error that the slug size is too large.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].