Skip to content

Instantly share code, notes, and snippets.

@juliandescottes
Created March 31, 2025 14:22
Show Gist options
  • Save juliandescottes/4ff16981f1c8d1231df0d45cf8654155 to your computer and use it in GitHub Desktop.
Save juliandescottes/4ff16981f1c8d1231df0d45cf8654155 to your computer and use it in GitHub Desktop.
Use moz module from puppeteer
const puppeteer = require("puppeteer");
(async () => {
const browser = await puppeteer.launch({
browser: 'firefox',
headless: false,
// Path to your local build of FF with moz:browserConsole module.
executablePath: '/Users/juliandescottes/Development/mozilla/hg/mozilla-unified/objdir.noindex/dist/Nightly.app/Contents/MacOS/firefox'
});
const page = await browser.newPage();
const res = await browser.connection.send(
'moz:browserConsole.evaluate',
{
expression: "Services.appinfo.appBuildID"
}
);
const appBuildID = res.result;
console.log("Evaluated appBuildID", appBuildID);
await browser.close();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment