Electron VS puppeteer

Compare Electron vs puppeteer and see what are their differences.

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
Electron puppeteer
236 355
111,526 86,491
1.0% 0.6%
9.9 9.9
6 days ago about 18 hours ago
C++ TypeScript
MIT License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Electron

Posts with mentions or reviews of Electron. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-29.
  • Release Radar • February 2024 Edition
    13 projects | dev.to | 29 Feb 2024
    The team at Electron have been faithfully shipping new releases almost every single month. I think they had Christmas off 🤔. This popular framework has developers writing cross-platform desktop applications using JavaScript, HTML and CSS. The latest update depreciates some process events, and added new modules, APIs, methods, and more. Read into all the changes in the Electron release notes. This month, Electron also introduced a new formal RFC process.
    13 projects | dev.to | 29 Feb 2024
  • The IDEs we had 30 years ago and we lost
    14 projects | news.ycombinator.com | 28 Dec 2023
    VS Code has been crashing at launch in Wayland since more than eight months ago:

    https://github.com/electron/electron/issues/37531

  • Design Systems with Web Components
    5 projects | dev.to | 18 Dec 2023
    So we talked a lot about the Atomic Design Principle, but you could just use that in any system and start creating. You could have Angular components, React Components, and Vue Components. But if you notice these don't easily work Everwhere. So the solution is to use Web Components because the modern browser can already understand these, and any Front-End framework can then utilize these components. You can use Electron for desktop (Slack, VSCode), PWA for both Android and iOS, and across all browsers Can I Use.
  • How I got Wayland, Vulkan, and hardware acceleration working with Figma on Fedora 39.
    2 projects | /r/linux | 7 Nov 2023
    I'm noticing a significant boost in performance, crisper text, and better power savings. The only shortcoming is that the window which Figma will run on will lose its shadow. This is due to a technical limitation with frameless windows on Linux.
  • Building Apps with Tauri and Elixir
    14 projects | dev.to | 19 Oct 2023
    For the longest time, building desktop apps was a daunting task to web developers. That is, until technologies like Electron made creating these apps more approachable to a wider audience. Today, we’ve got a wide array of native applications built with solutions like Electron, Tauri, Capacitor, and many more. While these are great solutions, sometimes configuration can be tricky and the applications we create can become somewhat bloated in terms of memory usage.
  • CVE-2023-4863: Heap buffer overflow in WebP (Chrome)
    18 projects | news.ycombinator.com | 12 Sep 2023
    It does, see [0]. Fun fact: Signal desktop, which uses Electron under the hood, is running without sandbox on Linux [1][2].

    [0] https://github.com/electron/electron/pull/39824

    [1] https://github.com/signalapp/Signal-Desktop/issues/5195

    [2] https://github.com/signalapp/Signal-Desktop/pull/4381

  • $Home, Not So Sweet $Home
    7 projects | news.ycombinator.com | 16 Aug 2023
  • Electron, Angular & Firebase "INTERNAL ASSERTION FAILED: Expected a class definition"
    2 projects | /r/electronjs | 2 Jul 2023
    import {app, BrowserWindow, screen} from 'electron'; import * as path from 'path'; import * as fs from 'fs'; let win: BrowserWindow | null = null; const args = process.argv.slice(1), serve = args.some(val => val === '--serve'); function createWindow(): BrowserWindow { const size = screen.getPrimaryDisplay().workAreaSize; // Create the browser window. win = new BrowserWindow({ x: 0, y: 0, width: size.width, height: size.height, webPreferences: { nodeIntegration: true, allowRunningInsecureContent: (serve), contextIsolation: false, }, }); win.maximize(); win.show(); if (serve) { const debug = require('electron-debug'); debug(); require('electron-reloader')(module); win.loadURL('http://localhost:4200'); } else { // Path when running electron executable let pathIndex = './index.html'; if (fs.existsSync(path.join(__dirname, '../dist/index.html'))) { // Path when running electron in local folder pathIndex = '../dist/index.html'; } const url = new URL(path.join('file:', __dirname, pathIndex)); win.loadURL(url.href); } // Emitted when the window is closed. win.on('closed', () => { // Dereference the window object, usually you would store window // in an array if your app supports multi windows, this is the time // when you should delete the corresponding element. win = null; }); return win; } try { // This method will be called when Electron has finished // initialization and is ready to create browser windows. // Some APIs can only be used after this event occurs. // Added 400 ms to fix the black background issue while using transparent window. More detais at https://github.com/electron/electron/issues/15947 app.on('ready', () => setTimeout(createWindow, 400)); // Quit when all windows are closed. app.on('window-all-closed', () => { // On OS X it is common for applications and their menu bar // to stay active until the user quits explicitly with Cmd + Q if (process.platform !== 'darwin') { app.quit(); } }); app.on('activate', () => { // On OS X it's common to re-create a window in the app when the // dock icon is clicked and there are no other windows open. if (win === null) { createWindow(); } }); } catch (e) { // Catch Error // throw e; }
  • Wayland Is Pretty Good
    4 projects | news.ycombinator.com | 29 Jun 2023
    Wayland as a concept is pretty good.

    But I would strongly urge anyone from switching to it unless you have nostalgia about the bug-ridden nature of the 2010-era Linux Desktop.

    I’m still using it, by the way, with Hyprland, but I think I’ll be switching back to X11/i3 soon. Here’s a taste of my experience thus far.

    Electron apps are a mess. This isn’t (all) wayland’s fault but for issue lists like https://github.com/electron/electron/issues?q=is%3Aissue+is%... to exist, proponents of wayland would find it in their best interest to tackle the problems given the large number of applications that use electron.

    Screen sharing doesn’t work. All the old fixes are to be ignored - it has regressed. Again. Font sizes are screwy. VSCode simply doesn’t work. The handy slack shortcuts like ctrl+shift+space for mute that work anywhere only work when slack is focused on Wayland.

    If you have multiple monitors of different scaling factors, moving a window from one to the other results in it becoming unbearably blurry.

    wl-clipboard and vim with clipboard=unnamedplus (the only reasonable clipboard) simply don’t work well together, and have a history of bugs going back for FOUR YEARS. At the moment, holding down x or d for repeated deletes is INSANELY slow. As in, I’m used to it working at my repeat rate of ~60 deletes per second and it barely does 3.

    Every now and then, my cursor becomes huge. Every now and then, it becomes tiny. No idea why, and I’m afraid to ask.

    Basically, it’s not a comfortable experience.

puppeteer

Posts with mentions or reviews of puppeteer. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-26.
  • HTML to PDF renderers: A simple comparison
    4 projects | dev.to | 26 Mar 2024
    HTML to PDF conversion is a common requirement in modern web applications. It allows users to save web pages, reports, and other content in a format that is easy to share and print. There are many libraries and services available for converting HTML to PDF, each with its own strengths and weaknesses. In this article, we will compare some of the most popular HTML to PDF renderers in Node.js, including Puppeteer, Playwright, node-html-pdf, and Onedoc.
  • Let's build a screenshot API
    8 projects | dev.to | 24 Mar 2024
    Playwright seems to be a superior library for working with headless browsers than Puppeteer, but I will go with Puppeteer.
  • JS Toolbox 2024: Bundlers and Test Frameworks
    10 projects | dev.to | 3 Mar 2024
    Puppeteer is a Node library that provides a high-level API to control headless Chrome or Chromium. It's primarily used for browser automation, making it a powerful tool for end-to-end testing of web applications, taking screenshots, and generating pre-rendered content from web pages.
  • Next.js 14 Booking App with Live Data Scraping using Scraping Browser
    3 projects | dev.to | 22 Feb 2024
    Puppeteer
  • Eleve o nível de suas Aplicações Javascript com Load Test
    2 projects | dev.to | 17 Feb 2024
    Website: pptr.dev Repositório: GitHub
  • Pyppeteer Tutorial: The Ultimate Guide to Using Puppeteer with Python
    5 projects | dev.to | 5 Feb 2024
    # Define variables PYTHON := python3 POETRY := poetry PYTEST := pytest PIP := pip3 PROJECT_NAME := web automation with Pyppeteer .PHONY: install install: $(POETRY) install @echo "Dependency installation complete" $(PIP) install -r requirements.txt @echo "Set env vars LT_USERNAME & LT_ACCESS_KEY" # Procure Username and AccessKey from https://accounts.lambdatest.com/security export LT_USERNAME=himansh export LT_ACCESS_KEY=Ia1MiqNfci .PHONY: install poetry-install: poetry install .PHONY: test test: export NODE_ENV = test .PHONY: test pyunit-pyppeteer: - echo $(EXEC_PLATFORM) - $(PYTHON) tests/pyunit-pyppeteer/test_pyunit_pyppeteer.py .PHONY: test pytest-pyppeteer: - echo $(EXEC_PLATFORM) - $(PYTEST) --verbose --capture=no -s -n 2 tests/pytest-pyppeteer/test_pytest_pyppeteer_1.py \ tests/pytest-pyppeteer/test_pytest_pyppeteer_2.py .PHONY: test pyunit-pyppeteer-browser-session: - echo $(EXEC_PLATFORM) - $(PYTHON) tests/starting-browser-session/pyunit/test_pyppeteer_browser_session.py .PHONY: test pytest-pyppeteer-browser-session: - echo $(EXEC_PLATFORM) - $(PYTEST) --verbose --capture=no -s \ tests/starting-browser-session/pytest/test_pyppeteer_browser_session.py .PHONY: test asyncio-run-pyppeteer-browser-session: - echo $(EXEC_PLATFORM) - $(PYTHON) tests/starting-browser-session/asyncio_run/test_pyppeteer_browser_session.py .PHONY: test asyncio-run-complete-pyppeteer-browser-session: - echo $(EXEC_PLATFORM) - $(PYTHON) tests/starting-browser-session/\ asyncio_run_until_complete/test_pyppeteer_browser_session.py .PHONY: test pyppeteer-button-click: - echo $(EXEC_PLATFORM) - $(PYTEST) --verbose --capture=no -s tests/button-click/test_page_class_click.py .PHONY: test pyppeteer-activate-tab: - echo $(EXEC_PLATFORM) - $(PYTEST) --verbose --capture=no -s tests/active-tab/test_page_class_bringtofront.py ###### Testing Custom Environment - https://miyakogi.github.io/pyppeteer/reference.html#environment-variables # Available versions: 113, 121, and default .PHONY: test pyppeteer-custom-chromium-version: - echo $(EXEC_PLATFORM) - echo 'Browser Version:' $(CHROMIUM_VERSION) - $(PYTEST) --verbose --capture=no -s tests/custom-configuration/test_launcher_exe_path.py ###### Testing Headless - https://miyakogi.github.io/pyppeteer/reference.html#launcher # Available values: headless and non-headless .PHONY: test pyppeteer-custom-browser-mode: - echo $(EXEC_PLATFORM) - echo $(BROWSER_MODE) - $(PYTEST) --verbose --capture=no -s tests/custom-configuration/test_launcher_headless.py .PHONY: test pyppeteer-generate-pdf: - echo $(EXEC_PLATFORM) - $(PYTEST) --verbose --capture=no -s tests/generate-pdf/test_page_class_pdf.py .PHONY: test pyppeteer-generate-screenshot: - echo $(EXEC_PLATFORM) - $(PYTEST) --verbose --capture=no -s tests/generate-screenshots/test_page_class_screenshot.py .PHONY: test pyppeteer-cookies: - echo $(EXEC_PLATFORM) - $(PYTEST) --verbose --capture=no -s tests/handling-cookies/test_page_class_cookies.py .PHONY: test pyppeteer-dialog-box: - echo $(EXEC_PLATFORM) - $(PYTEST) --verbose --capture=no -s tests/handling-dialog-box/test_handling_dialog_box.py .PHONY: test pyppeteer-iframe: - echo $(EXEC_PLATFORM) - $(PYTEST) --verbose --capture=no -s tests/handling-iframe/test_page_class_iframe.py # Like Puppeteer, Navigation operations mentioned below only work in Headless mode # goBack: https://miyakogi.github.io/pyppeteer/reference.html#pyppeteer.page.Page.goBack # goForward: https://miyakogi.github.io/pyppeteer/reference.html#pyppeteer.page.Page.goForward # Bug Link # https://github.com/puppeteer/puppeteer/issues/7739 # https://stackoverflow.com/questions/65540674/how-to-error-check-pyppeteer-page-goback .PHONY: test pyppeteer-navigate-ops: - echo $(EXEC_PLATFORM) - $(PYTEST) --verbose --capture=no -s tests/navigate-operations/test_page_class_navigation_ops.py .PHONY: test pyppeteer-request-response: - echo $(EXEC_PLATFORM) - $(PYTEST) --verbose --capture=no -s tests/request-response/test_page_class_req_resp.py .PHONY: test pyppeteer-viewport: - echo $(EXEC_PLATFORM) - echo $(BROWSER_MODE) - $(PYTEST) --verbose --capture=no -s tests/setting-useragent-viewports/\ test_page_class_useragent_viewport.py::test_mod_viewport .PHONY: test pyppeteer-non-headless-useragent: - echo $(EXEC_PLATFORM) - echo $(BROWSER_MODE) - $(PYTEST) --verbose --capture=no -s tests/setting-useragent-viewports/\ test_page_class_useragent_viewport.py::test_get_nonheadless_user_agent .PHONY: test pyppeteer-headless-useragent: - echo $(EXEC_PLATFORM) - echo $(BROWSER_MODE) - $(PYTEST) --verbose --capture=no -s tests/setting-useragent-viewports/\ test_page_class_useragent_viewport.py::test_get_headless_user_agent .PHONY: test pyppeteer-dynamic-content: - echo $(EXEC_PLATFORM) - echo $(BROWSER_MODE) - $(PYTEST) --verbose --capture=no -s -n 4 tests/handling-dynamic-content/\ test_page_class_lazy_loaded_content.py .PHONY: test pyppeteer-web-scraping: - echo $(EXEC_PLATFORM) - $(PYTEST) --verbose --capture=no -s tests/web-scraping-content/\ test_scraping_with_pyppeteer.py .PHONY: clean clean: # This helped: https://gist.github.com/hbsdev/a17deea814bc10197285 find . | grep -E "(__pycache__|\.pyc$$)" | xargs rm -rf rm -rf .pytest_cache/ @echo "Clean Succeeded" .PHONY: distclean distclean: clean rm -rf venv .PHONY: help help: @echo "" @echo "install : Install project dependencies" @echo "clean : Clean up temp files" @echo "pyunit-pyppeteer : Running Pyppeteer tests with Pyunit framework" @echo "pytest-pyppeteer : Running Pyppeteer tests with Pytest framework" @echo "pyunit-pyppeteer-browser-session : Browser session using Pyppeteer and Pyunit" @echo "pytest-pyppeteer-browser-session : Browser session using Pyppeteer and Pytest" @echo "asyncio-run-pyppeteer-browser-session : Browser session using Pyppeteer (Approach 1)" @echo "asyncio-run-complete-pyppeteer-browser-session : Browser session using Pyppeteer (Approach 2)" @echo "pyppeteer-button-click : Button click demo using Pyppeteer" @echo "pyppeteer-activate-tab : Switching browser tabs using Pyppeteer" @echo "pyppeteer-custom-chromium-version : Custom Chromium version with Pyppeteer" @echo "pyppeteer-custom-browser-mode : Headless and non-headless test execution with Pyppeteer" @echo "pyppeteer-generate-pdf : Generating pdf using Pyppeteer" @echo "pyppeteer-generate-screenshot : Generating page & element screenshots with Pyppeteer" @echo "pyppeteer-cookies : Customizing cookies with Pyppeteer" @echo "pyppeteer-dialog-box : Handling Dialog boxes with Pyppeteer" @echo "pyppeteer-iframe : Handling iFrames with Pyppeteer" @echo "pyppeteer-navigate-ops : Back & Forward browser operations with Pyppeteer" @echo "pyppeteer-request-response : Request and Response demonstration using Pyppeteer" @echo "pyppeteer-viewport : Customizing viewports using Pyppeteer" @echo "pyppeteer-non-headless-useragent : Customizing user-agent (with browser in headed mode) using Pyppeteer" @echo "pyppeteer-headless-useragent : Customizing user-agent (with browser in headless mode) using Pyppeteer" @echo "pyppeteer-dynamic-content : Handling dynamic web content using Pyppeteer" @echo "pyppeteer-web-scraping : Dynamic web scraping using Pyppeteer"
  • How to build a WhatsApp AI assistant
    7 projects | dev.to | 26 Jan 2024
    This library works by creating an instance of WhatsApp web running inside an instance of headless chrome automated by puppeteer. In my testing, I ran into tons of compatibility issues when trying to use these dependencies inside anything other than a bare-bones Node.js + express server. Also, we can’t spin up a new instance of chrome and WhatsApp web each time a user sends a message, this will exhaust our allowed WhatsApp connections (4 max), not to mention that doing this will make the response times painfully slow.
  • Show HN: Quetta – A privacy-first web browser with enhanced ad blocker inside
    2 projects | news.ycombinator.com | 18 Jan 2024
    It's a tricky balance to strike. Obviously, krono, you're right: ff we're being generous the app launch GA tracker they use, they probably consider it shares nothing of value or identifiable, but strictly speaking it's not true that no data shared.

    I think the audit you do is actually valuable. In my company's product, BrowserBox^0 (also a browser, funnily enough! focused on remote isolation, privacy & security, and including Tor support), we don't collect anything but we want to add some kind of telemetry regarding usage so we can even basically know how many daily users we have (outside of licensed channels where it's tracked in the contract).

    Even tho we don't collect anything, we don't advertise "Zero data collection" anywhere, because of how sensitive I think this topic is. I think we really need to be solid on it, if we're going to say that. And to cover us, in the privacy policy, we say "we may collect some data for operational purposes to ensure the continued running of the service" (paraphrasing), even tho we don't.

    One niggle is that we use Chrome in headless mode (can also use Edge / Chromium), and while we appreciate the auto updating quality that Chrome has for security patches, we're cautious that maybe Chrome still collects telemetry and sends it to Google even with headless and correct flags (see for instance: https://github.com/puppeteer/puppeteer/blob/afb7d9eb5854e851...)

    I know it's not your job...but what's your advice on how to proceed specifically?

    0: https://github.com/BrowserBox/BrowserBox

  • How to track anything on the internet or use Playwright for fun and profit
    5 projects | dev.to | 16 Jan 2024
    If you've read my previous blog posts or ever experimented with Secutils.dev, you might be familiar with the web resources tracking utility. This utility allows you to monitor changes in web page resources, specifically JavaScript and CSS. While it has a somewhat narrow security-focused purpose — detecting broken or tampered web application deployments — it may not be the type of tool you use daily. Nevertheless, it serves as a good example of what you can build with modern browser automation tools like Playwright and Puppeteer. If you're interested in digging deeper into this specific utility, refer to the following blog post series:
  • How to solve reCAPTCHA in Puppeteer using extension
    3 projects | dev.to | 9 Nov 2023
    Installing Puppeteer and other required packages: npm i puppeteer puppeteer-extra puppeteer-extra-plugin-stealth

What are some alternatives?

When comparing Electron and puppeteer you can also consider the following projects:

tauri - Build smaller, faster, and more secure desktop applications with a web frontend.

axios - Promise based HTTP client for the browser and node.js

Nightmare - A high-level browser automation library.

WKHTMLToPDF - Convert HTML to PDF using Webkit (QtWebKit)

Playwright - Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

puppeteer-extra - 💯 Teach puppeteer new tricks through plugins.

dotenv - Loads environment variables from .env for nodejs projects.

karma - Spectacular Test Runner for JavaScript

pyppeteer - Headless chrome/chromium automation library (unofficial port of puppeteer)

cheerio - The fast, flexible, and elegant library for parsing and manipulating HTML and XML.

Pdfkit - A Ruby gem to transform HTML + CSS into PDFs using the command-line utility wkhtmltopdf

Eel - A little Python library for making simple Electron-like HTML/JS GUI apps