How to test an extension in PupeteerSharp headless mode?

22 Views Asked by At

Here is an article describing how to test an extension in PuppeteerSharp: https://www.puppeteersharp.com/examples/ChromeExtension.html

The problem here is that it requires headless option to be set to false. If I set it to true, extension just stops being loaded.

I need a headless mode to be set to true, because I'm trying to run some automated tests in Docker container which doesn't have an x-server that can be used to display a browser window.

I suspect it might be possible to do, as official Puppeteer docs say:

Extensions in Chrome/Chromium currently only work in non-headless mode and experimental Chrome headless mode.

Do you know how to enable experimental headless mode in Chrome when using PupeteerSharp?

0

There are 0 best solutions below