I cannot use my currently installed extensions in Google Chrome using headless mode. Is there any way to enable them?
An easy way to check if the extensions work is by adding, for example, the "Comic Sans Everything" extension.
So Google looks like that:
However, if I take a screenshot of the page using the headless mode (google-chrome --headless --disable-gpu --screenshot https://www.google.com
), the result is:
You can run Chrome with extensions headless using Xvfb.
sudo dnf install xorg-x11-server-Xvfb
xvfb-run google-chrome --remote-debugging-port=9222 --disable-gpu https://www.google.com
More complicated, but it does work. It's what we use for headless chrome extension testing.