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


Copilot Improves Code Quality
27/11/2024

Findings from GitHub show that code authored with Copilot has increased functionality and improved readability, is of better quality, and receives higher approval rates than code authored without it.

 [ ... ]



Advent Of Code 2024 Now Underway
01/12/2024

December 1st is much anticipated among those who like programming puzzles. It is time to start solving small but tricky puzzles on the Advent of Code website with the goal of amassing 50 stars by Chri [ ... ]


More News

espbook

 

Comments




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

Last Updated ( Thursday, 15 August 2024 )