Trying to get headless driver working #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: [ubuntu-latest] | |
steps: | |
- name: Install Selenium | |
run: | | |
sudo pip3 install selenium | |
- name: ChromeWebDriver | |
run: | | |
cat <<EOF >> test.py | |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
options = Options() | |
options.add_argument("--headless") | |
options.add_argument('--no-sandbox') | |
options.add_argument('--disable-gpu') | |
options.add_argument('--disable-dev-shm-usage') | |
options.add_argument('disable-infobars') | |
options.add_argument("--disable-extensions") | |
driver = webdriver.Chrome(chrome_options=options, executable_path='/usr/bin/chromedriver') | |
driver.get("http://github.com/") | |
print ('Page title is ' + driver.title) | |
EOF | |
python3 test.py |