The problem is I haven't found any Puppeteer configuration I can use for such purpose. Force my users to download Chromium at runtime (at first usage for example).Download Chromium selectively at packaging time (still on dev machine).Download all-platform Chromium when npm install (on dev machine).I should be able to do one of the following: Being current platform Linux, this very version of Chromium is then shipped regardlessly on every platform's app. Theres a project called Jest Puppeteer, which allows QA and developers to run tests created for Jest with Puppeteer.It offers an easy way to run your tests with Puppeteer and provides specific matchers, tailored to Puppeteer, called expect-puppeteer. When you install Puppeteer, it automatically downloads a recent version of Chrome for Testing (170MB macOS, 282MB Linux, 280MB Windows) that is guaranteed to work with Puppeteer. create a new folder and navigate inside it mkdir formdemo cd formdemo. So we can simply add it to our node project with npm install or yarn add command. As mentioned above Puppeteer is a node library. \ search/amazon.js You can run these scripts in the puppeteer sandbox. To use Puppeteer in your project, run: npm i puppeteer or using yarn yarn add puppeteer or using pnpm pnpm i puppeteer. In this section, we will get our project setup. git clone cd puppeteer-examples npm i node 2. Clone this repo and run them directy with a simple node command. The problem is: Chromium is downloaded at npm install time, and it's done selectively based on the current platform. Feel free to contribute Puppeteer Headless Chrome examples for real life use cases. Click any example below to run it instantly proxy whatsapp-web. It works nice-and-smooth except for this issue:Ĭhromium is not downloaded exception is thrown when the app is executed on a platform different than the one the app has been packaged on.īetter said, I'm developing on a Linux environment and I'm packaging my app for both Linux and Windows, Linux app works fine, Windows app doesn't. Puppeteer Examples and Templates Use this online puppeteer playground to view and fork puppeteer example apps and templates on CodeSandbox. download puppeteer or ask your own question. I'm building a UI-automator with Puppeteer and I'm shipping it as a Electron-packaged app. When the download button is clicked, a new tab is opened where the user can view a PDF statement.
0 Comments
Leave a Reply. |