Need help with puppeteer-in-electron?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

TrevorSundberg
156 Stars 25 Forks MIT License 55 Commits 10 Opened issues

Description

Use puppeteer to test and control your electron application.

Services available

!
?

Need anything else?

Contributors list

# 388,051
Linux
xna
Windows
TypeScr...
32 commits
# 95,597
TypeScr...
HTML
Svelte
craftbu...
2 commits
# 40,584
webrtc
Go
golang
webrtc-...
1 commit
# 30,045
Vim
TypeScr...
Node.js
Electro...
1 commit

Introducing puppeteer-in-electron

Use puppeteer to test and control your electron application.

npm install puppeteer-in-electron puppeteer-core electron

See the API documentation.

JavaScript

const {BrowserWindow, app} = require("electron");
const pie = require("puppeteer-in-electron")
const puppeteer = require("puppeteer-core");

const main = async () => { await pie.initialize(app); const browser = await pie.connect(app, puppeteer);

const window = new BrowserWindow(); const url = "https://example.com/"; await window.loadURL(url);

const page = await pie.getPage(browser, window); console.log(page.url()); window.destroy(); };

main();

TypeScript

import {BrowserWindow, app} from "electron";
import pie from "puppeteer-in-electron";
import puppeteer from "puppeteer-core";

const main = async () => { await pie.initialize(app); const browser = await pie.connect(app, puppeteer);

const window = new BrowserWindow(); const url = "https://example.com/"; await window.loadURL(url);

const page = await pie.getPage(browser, window); console.log(page.url()); window.destroy(); };

main();

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.