6

Dockerized Headless Chrome Example

 3 years ago
source link: https://zwischenzugs.com/2017/07/15/dockerized-headless-chrome-example/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Dockerized Headless Chrome Example

zwischenzugs Uncategorized July 15, 2017August 9, 2017

1 Minute

For those of us obsessed with automation, the PhantomJS library was manna from heaven, allowing you to programmatically automate web interactions against a ‘real’ web browser without need a screen to interact with.

Earlier this year, the principal maintainer announced that he was stepping down from the project in favour of ‘Headless Chrome’.

Headless Chrome is still new, and there isn’t much material to chew on yet, but I came across this blog post, which shows how to set up an Ubuntu Trusty server with a simple screen grabber script.

I thought I’d transfer this to a Docker container, as lightweight spinning up of these processes will be a boon for testing.

Here’s a video of the script getting screenshots of two randomly-chosen websites:

The repository is here.

My book on Docker:

5d342-0v9jkbliyi3uzefqq.jpg?w=640

Get 39% off with the code: 39miell2


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK