Live data from Hacker News

Puppeteer Support for Firefox

hacks.mozilla.org

11–20 of 92 posts

Re: Puppeteer Support for Firefox

#11
post #2

Ranked #4 on HN at the moment and no comments. So I'll just say hi. (Selenium project creator here. I had nothing to do with this announcement, but feel free to ask me anything!) My hot take on things: When the Puppeteer team left Google to join Microsoft and continue the project as Playwright, that left Google high and dry. I don't think Google truly realized how complementary a browser automation tool is to an AI-a…

If I wanted to write some simple web-automation as a DevOps engineer with little javascript (or webdev experience at all) what tool would you recommend? Some example use cases would be writing some basic tests to validate a UI or automate some form-filling on a javascript based website with no API.

Unironically, ask ChatGPT (or your favorite LLM) to create a hello world WebDriver or Puppeteer script (and installation instructions) and go from there.

Re: Puppeteer Support for Firefox

#13
post #11

Earlier quoted context omitted.

If I wanted to write some simple web-automation as a DevOps engineer with little javascript (or webdev experience at all) what tool would you recommend? Some example use cases would be writing some basic tests to validate a UI or automate some form-filling on a javascript based website with no API.

Unironically, ask ChatGPT (or your favorite LLM) to create a hello world WebDriver or Puppeteer script (and installation instructions) and go from there.

“Go ask ChatGPT” is the new “RTFM”.

Re: Puppeteer Support for Firefox

#14
post #11

Earlier quoted context omitted.

Unironically, ask ChatGPT (or your favorite LLM) to create a hello world WebDriver or Puppeteer script (and installation instructions) and go from there.

“Go ask ChatGPT” is the new “RTFM”.

sorry, not sorry?

Re: Puppeteer Support for Firefox

#15
post #10

Earlier quoted context omitted.

I see im still looking for a way to control browser from the inside via an extension browser. very tough problem to solve.

Yup. Lately, I've been doing it a completely different way (but still from the outside)... Using a Raspberry Pi as a fake keyboard and mouse. (Makes more sense in the context of mobile automation than desktop.) What's good for security is generally bad for automation... and trying to automate from inside a heavily secured sandbox is... frustrating. It works a little bit (as Cypress folks more recently learned), but y…

interesting so you are emulating hardware inputs from RPi

how is it reading whats on the screen? computer vision?

Re: Puppeteer Support for Firefox

#16
post #12

Are there any advantages to using Firefox over Chrome for exporting PDFs with Puppeteer?

I've found Firefox to produce better PDFs than Chrome does, for what it's worth. There are some CSS properties that Chrome/Skia doesn't honour properly (e.g. repeating-linear-gradient) or ends up generating PDFs from that don't work universally.

Re: Puppeteer Support for Firefox

#17
post #2

Ranked #4 on HN at the moment and no comments. So I'll just say hi. (Selenium project creator here. I had nothing to do with this announcement, but feel free to ask me anything!) My hot take on things: When the Puppeteer team left Google to join Microsoft and continue the project as Playwright, that left Google high and dry. I don't think Google truly realized how complementary a browser automation tool is to an AI-a…

Is the WebDriver standard a good one? (Relative to playwright I guess) I seem to recall some pains implementing it a few years ago.

Re: Puppeteer Support for Firefox

#18
post #16
post #12

Are there any advantages to using Firefox over Chrome for exporting PDFs with Puppeteer?

I've found Firefox to produce better PDFs than Chrome does, for what it's worth. There are some CSS properties that Chrome/Skia doesn't honour properly (e.g. repeating-linear-gradient) or ends up generating PDFs from that don't work universally.

Indeed, Firefox uses PDF.js which I've found to produce really good results.

Re: Puppeteer Support for Firefox

#19
post #4

Earlier quoted context omitted.

Puppeteer controls a browser... from the outside... like a puppeteer controls a puppet. Other tools like Cypress (and ironically the very first version of Selenium 20 years ago) drive the browser from the inside using JavaScript. But we abandoned that "inside out" approach in later versions of Selenium because of the limitations imposed by the browser JS security sandbox. Cypress is still trying to make it work and I…

I see im still looking for a way to control browser from the inside via an extension browser. very tough problem to solve.

are you using native messaging? there's a way to bridge a program running with full permissions inside the computer that could use puppeteer or the like. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...

seems like it wouldn't be that hard to sync the two but the devil is in the details. also installing the native script is outside the purview of the webext so you need to have an installer.

Re: Puppeteer Support for Firefox

#20
post #2

Ranked #4 on HN at the moment and no comments. So I'll just say hi. (Selenium project creator here. I had nothing to do with this announcement, but feel free to ask me anything!) My hot take on things: When the Puppeteer team left Google to join Microsoft and continue the project as Playwright, that left Google high and dry. I don't think Google truly realized how complementary a browser automation tool is to an AI-a…

is it possible to now use Puppeteer from inside the browser? or do security concerns restrict this? what does Webdriver Bidi do and what do you mean by "taking the good stuff from CDP" I don't want to run my scrapes in the cloud and pay a monthly fee I want to run them locally. I want to run LLM locally too. I'm sick of SaaS

> Is it possible to now use Puppeteer from inside the browser?

Talking about WebDriver (BiDi) in general rather than Puppeteer specifically, it depends what exactly you mean.

Classic WebDriver is a HTTP-based protocol. WebDriver BiDi uses websockets (although other transports are a possibility for the future). Script running inside the browser can create HTTP connections and create websockets connections, so you can create a web page that implements a WebDriver or WebDriver BiDi client. But of course you need to have a browser to connect to, and that needs to be configured to actually allow connections from your host; for obvious security reasons that's not allowed by default.

This sounds a bit obscure, but it can be useful. Firefox devtools is implemented in HTML+JS in the browser (like the rest of the Firefox UI), and can connect to a different Firefox instance (e.g. for debugging mobile Firefox from desktop). The default runner for web-platform-tests drives the browser from the outside (typically) using WebDriver, but it also provides an API so the in-browser tests can access some WebDriver commands.

Post reply on HN