hross.net
tech + caffeine = blog

Headless Chrome Basic Auth

I recently spent some time checking out Headless Chrome since it seems it will probably at least kill PhantomJS.

It doesn’t yet fully appear ready for prime time but, there are some cool uses already in the wild.

All I wanted to do was hit a page that had basic auth enabled, but it turned out to be more of a task than I thought. Here are some of my notes:

(From askubuntu)

sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
sudo apt-get install -f
sudo dpkg -i google-chrome*.deb
google-chrome-stable --headless --disable-gpu --no-sandbox --remote-debugging-port=9222 --remote-debugging-address=10.138.33.145  http://www.google.com

Navigating to that port/IP should display a page you can debug your Chrome session on.

Fork me on GitHub