Created
August 25, 2018 04:29
-
-
Save neomadara/e1540c30f709c06aae5056a085c67341 to your computer and use it in GitHub Desktop.
crash chrome
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
#!/usr/bin/env python3 | |
import subprocess | |
from selenium import webdriver | |
some_site = 'http://www.google.com' | |
chromedriver_path = '/usr/lib/chromium-browser/chromedriver' | |
# Block until Chromium finishes launching and self-terminates | |
subprocess.run(['chromium-browser', '--headless', '--disable-gpu', '--dump-dom', 'about:blank']) | |
browser = webdriver.Chrome(executable_path=chromedriver_path) | |
browser.get(some_site) | |
# Continue on with your Selenium business... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment