Created
March 31, 2025 14:22
-
-
Save juliandescottes/4ff16981f1c8d1231df0d45cf8654155 to your computer and use it in GitHub Desktop.
Use moz module from puppeteer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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