microsoft / playwright-dotnet

.NET version of the Playwright testing and automation library.
https://playwright.dev/dotnet/
MIT License
2.47k stars 235 forks source link

[Question]: Chrome extensions #1925

Closed Vunpac closed 2 years ago

Vunpac commented 2 years ago

Your question

I'm trying to use Chrome Extensions. Specific extensions are required to use the web app. I can't seem to find anything related to loading extensions when loading chromium. Any help would be greatly appriciated.

mxschmitt commented 2 years ago

Do you only want to load an extension or access it also its background page?

Accessing the background page is not yet possible in playwright-dotnet, we could create a feature request out of it.

If you just want to load an extension, you need to unpack it and pass it as Chromium args to when you launch the process, see here: https://playwright.dev/docs/chrome-extensions something like that should work in .NET as of today.

Vunpac commented 2 years ago

Ah I see, I need to use it as well. I think Playwright is on the right track however, my use cases are more general automation rather than unit testing. So for that, I'll just have to suck it up and get back into javascript and make some useful automation tools that I can use with full browser access.

Still looking forward to seeing the progress Playwright makes! Best I've seen in a long time.