[Feature request] Support browser extension loading in Firefox
See original GitHub issueI’m trying to perform extension automation using playwright against Firefox. Below is my sample code
import {
firefox
} from 'playwright';
const extensionPath = "/Users/ashok_mb/Documents/xBP/Learner/playwright_spike/ff_extn/extension.xpi"
const userDataDir = '/Users/ashok_mb/Library/Application\ Support/Firefox/Profiles/data_dir';
firefox.launch({
headless: false,
firefoxUserPrefs: {
"xpinstall.signatures.required": false,
"extensions.langpacks.signatures.required": false,
},
args: [
`--disable-extensions-except=${extensionPath}`,
`--load-extension=${extensionPath}`
]
});
With above code, the browser launches, but does not load extension with it. Can someone please advice on how to launch Firefox with extension using playwright code ?
Please help. Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:10 (5 by maintainers)
Top Results From Across the Web
I want to make a feature request. How to do it properly ...
You can press the ESC key to stop the page loading. ... Maybe there is already an extension with this feature and in...
Read more >Permission request messages for Firefox extensions
This is an extension asking your permission to tap into Firefox's inner framework (via APIs) to alter your browser's behavior.
Read more >Experimental features in Firefox - Mozilla - MDN Web Docs
This page lists Firefox's experimental and partially implemented features, including those for proposed or cutting-edge web platform ...
Read more >Chrome incompatibilities - Mozilla - MDN Web Docs
Extensions built with WebExtension APIs are designed to be compatible with Chrome and Opera extensions. As far as possible, extensions ...
Read more >Your first extension - Mozilla - MDN Web Docs
The most interesting key here is content_scripts , which tells Firefox to load a script into Web pages whose URL matches a specific...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
UPDATE: this doesn’t work for the new versions of Firefox. See & upvote https://github.com/microsoft/playwright/issues/7297
~Actually, you can run Firefox Extensions with Playwright, but it requires a little bit of a trickery:~ ~- using
web-ext
to actually run firefox with permissions~ ~- parsing firefox stdout to get juggler endpoint~ ~- using endpoint to connect playwright onto it~~The full repository is here: aslushnikov/demo-playwright-with-firefox-web-extension~
~The script to run a webextension:~
~Hope it helps!~
@mukunduashok Yeah, please raise a feature request. We’ve heard there’s some interest for web extensions, but it’s unclear how many developers actually care and if it’s worth investing there.