-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question/Feature Request: Extension support #558
Comments
Considering WebKit doesn’t support web extensions, would it be fair to consider this a request for Firefox extension support? You should be able to load extensions into Firefox though some launch arguments. But we don’t currently have a way for you to evaluate JavaScript in the extension context. |
Yeah, i was mainly thinking about FF |
@Banou26 you can already load web extensions to firefox using web-ext - that's the recommended way to load extensions to ff. We explored it a while back here: puppeteer/puppeteer#4162 (comment) Same instructions should work for PlayWright; cc'ing @denar90 who poked a lot into this. Hope this helps! |
Could you kindly share what the expected sequence is to start a playwright-controlled Firefox instance with extensions installed? I don't quite understand how to trigger all of this from my playwright script. |
I second what @gurupras said. I'm also very interested in how to use Playwright for testing WebExtensions. I tried the approach above with Playwright but I'm stuck with the following error when running my script: Error when running playwright script:
Here's my code relevant bits: web-ext confirmation juggler is listening:
my playwright script: browser = await browserWrapper.firefox.connect({
wsEndpoint: 'ws://127.0.0.1:1234/',
// also tried with:
// wsEndpoint: 'ws://127.0.0.1:1234/c1f80464-a717-b542-92bf-8884ddef3501',
// and:
// wsEndpoint: 'ws://127.0.0.1:1234/c1f80464-a717-b542-92bf-8884ddef3501/',
logger: { // doesn't show any other extra information
isEnabled: () => true,
log: (name, severity, message, args) => console.log(`${name} ${message}`),
},
}); I'm using: That's the only missing bit in my quest to fully automate my extension's testing :) Thank you! |
I have also just tried a different approach, without using juggler but rather connecting to the remote debugger as suggested in a different thread. I posted all details here: mozilla/web-ext#1927 (there's details about puppeteer and playwright) |
@gurupras @lfilho Oops sorry it took me a while. I posted some details here: mozilla/web-ext#1927 (comment) |
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Could WebExtensions be supported across browsers, or will they be restricted to chrome ?
The text was updated successfully, but these errors were encountered: