Puppeteer Library Improves Firefox Support
Written by Ian Elliot   
Thursday, 15 August 2024

The Puppeteer browser automation library has added first-class support for Firefox, making it easier to write automation routines and perform end-to-end testing using Puppeteer, for both Chrome and Firefox.

Puppeteer is a JavaScript library which provides a high-level API to control Chrome or Firefox over the DevTools Protocol or WebDriver BiDi. Puppeteer runs in headless mode (no visible UI) by default. Using Puppeteer for Firefox is simply a matter of setting the product to “firefox” when starting Puppeteer.

puppeteer

Puppeteer can be used to automate most tasks that can be carried out manually in the browser, such as automating form submissions for UI testing and keyboard input; or capturing a timeline trace of a site to help diagnose performance issues.

You can use it to create an automated testing environment using JavaScript and browser features, and to test Chrome extensions. The library can be used to generate screenshots and PDFs of pages, and to crawl a SPA (Single-Page Application) and generate pre-rendered content, i.e. "SSR", Server-Side Rendering.

The improved support for Firefox takes it onto the same basis as with Chrome, so Puppeteer can now download and launch the latest stable version of Firefox.

The Puppeteer team says the new support is not based on a Firefox-specific automation protocol, but on WebDriver BiDi. This is a crossibrowser protocol that's currently undergoing standardization at the W3C. It has implementations in Gecko and Chromium, and the hope is that using a cross-browser protocol should make it much easier to support many different browsers going forward.

The WebDriver BiDi replaces the need to either use the W3C WebDriver API, which was based on earlier work by the Selenium project, or to use a browser-specific API for talking to each supported browser such as Chrome DevTools Protocol (CDP) for Chromium-based browsers, or Firefox's Remote Debugging Protocol (RDP) for Gecko-based browsers.

WebDriver BiDi is described as bringing the automation feature set previously limited to browser-specific protocols to a standardized protocol that can be implemented by any browser and used by any automation tooling in any programming language.

Puppeteer support for Firefox is available now.

puppeteer

More Information

Puppeteer Website

Related Articles

Headless Chrome and the Puppeteer Library for Scraping and Testing the Web

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Google Opensources Privacy Library
08/11/2024

Google is making a new differential privacy library available as open source. PipelineDP4J is a Java-based library that can be used to analyse data sets while preserving privacy.



Azul Outperforms OpenJDK By Up To 37%
23/10/2024

Azul has announced that its Azul Platform Prime outperforms comparable OpenJDK distributions by as much as 37%. The company has also launched the Azul Java Performance Engineering Lab (JPEL) aimed at  [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 15 August 2024 )