# Selenium in Github Action

Jan 29, 2020

selenium

## .css-12m0k8p{pointer-events:auto;}Background.css-18hqai{color:#319795;font-weight:400;outline:none;opacity:0;margin-left:0.375rem;}.css-18hqai:focus{opacity:1;box-shadow:0 0 0 3px rgba(66,153,225,0.6);}#

I'm working on a project, which needs to use selenium to scrape google group where all the content is rendered using javascript. Writing a scraper isn't that hard. But we want to take the advantage of GitHub Action.

There are two essential parts when configuring selenium, which are Chrome application and chromedriver. chromedriver is just a executable binary file. I can just put it in the repository and call in the script. The problem is how to install the browser.

This Dockerfile shows how to install deb file. I haven't tried yet because docker-machine fails to run on my machine when I found this.

I found another docker-compose.yml. this is more convinient than the above method because with this all we need is set the command_executor to be http://127.0.0.1:4444/wd/hub and the browser can be dropped.

GitHub Action

Last Edited on Jan 29, 2020