geckodriver releases
chromedriver releases
docker ps -a | egrep "[Ee]xited" | awk '{print $1}' | xargs -Izz55 docker rm zz55
docker images | sed -E "s/[[:space:]]+/ /g" | awk '{print $3}' | xargs -Izz55 docker rmi zz55
docker volume ls | sed -E "s/[[:space:]]+/ /g" | awk '{print $2}' | xargs -Izz55 docker volume rm zz55
docker build -t debian-headless .
docker run -it debian-headless /bin/bash
- xfvb
chrome_test_xfvb.py
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
import xvfbwrapper
# Start headless display
display = xvfbwrapper.Xvfb()
display.start()
print('display started')
chrome_options = Options()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument("--disable-gpu")
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.get("http://www.google.com")
print(driver.title)
driver.quit()
display.stop()
print('display stopped')
- --headless
chrome_test.py
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument("--headless")
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument("--disable-gpu")
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.get("http://www.google.com")
print(driver.title)
driver.quit()
debian library
python-headless-chromedriver fail out of the box
firefox-headless
docker ignore error