

Creating a New Node.js ProjectĬreate a new puppeteer-firefox folder and go to the directory. The most recent version of Firefox Nightly will be downloaded automatically when you install the Puppeteer package via npm. To run Puppeteer with Firefox, you will need to have these installed:įor reference, these are the versions used in this tutorial:Īlthough we will be running Puppeteer with Firefox, you don’t need to install Firefox manually. Besides that, Puppeteer can also be used for other things like generating screenshots and PDFs of pages, crawling web pages, automating form submission, etc. It is commonly used by developers to automate the browser to run website tests. Puppeteer can do most things we do manually on the browser. It is an ongoing collaboration between Puppeteer and Mozilla to support cross-browser testing coverage for developers. It is developed to provide a high-level API to control Chrome or Chromium over Chrome DevTools Protocol.Īlthough Puppeteer is developed to run on Chrome, Puppeteer supports Firefox from Puppeteer v2.1.0 onwards. Puppeteer is a Node library that is open source and maintained by Google. You can use automation tool like Puppeteer to carry out automated testing on these browsers. Although all browser vendors follow the Web Standards, each browser renders the code differently. puppeteerrc.cjs (or developing an application, it is important to perform cross browser testing to make sure that the application runs as intended on different browsers like Google Chrome, Firefox, Safari, etc. Puppeteer uses several defaults that can be customized through configurationįor example, to change the default cache directory Puppeteer uses to installīrowsers, you can add a. Include $HOME/.cache into the project's deployment.įor a version of Puppeteer without the browser installation, see

Your project folder (see an example below) because not all hosting providers Heroku, you might need to reconfigure the location of the cache to be within If you deploy a project using Puppeteer to a hosting provider, such as Render or The browser is downloaded to the $HOME/.cache/puppeteer folderīy default (starting with Puppeteer v19.0.0). When you install Puppeteer, it automatically downloads a recent version ofĬhrome for Testing (~170MB macOS, ~282MB Linux, ~280MB Windows) that is guaranteed to
