File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44set -o errexit -o xtrace
55if type apt-get > /dev/null ; then
66 BROWSERS=" firefox chromium-browser"
7+ CHROMEDRIVER=" chromium-chromedriver"
78 if [[ " $( lsb_release -is) " == " Debian" ]]; then
89 # Iceweasel is the rebranded Firefox that Debian ships, and Chromium
910 # takes the name of 'chromium' instead of 'chromium-browser' in
1011 # Debian 7 (wheezy) and later.
1112 BROWSERS=" iceweasel chromium"
13+ CHROMEDRIVER=" chromedriver"
1214 fi
1315 sudo apt-get install libxml2-dev libxml2-utils libxslt1-dev python-dev \
1416 $BROWSERS zip sqlite3 python-pip libcurl4-openssl-dev \
15- chromium-chromedriver
17+ $CHROMEDRIVER
1618elif type brew > /dev/null ; then
1719 brew list python & > /dev/null || brew install python
1820 brew install libxml2 gnu-sed chromedriver
Original file line number Diff line number Diff line change 1010# of linux is required for the script to run correctly as well.
1111# Otherwise, use pyvirtualdisplay.
1212
13- import sys , os
13+ import sys , os , platform
1414from selenium import webdriver
1515from selenium .common .exceptions import WebDriverException
1616
@@ -35,7 +35,12 @@ class bcolors:
3535 # Travis has setuid restrictions. I think this becomes unnecessary in M42+?
3636 chromeOps .add_argument ('--disable-setuid-sandbox' )
3737elif sys .platform .startswith ("linux" ):
38- chromedriver_path = "/usr/lib/chromium-browser/chromedriver"
38+ if 'Ubuntu' in platform .linux_distribution ():
39+ chromedriver_path = "/usr/lib/chromium-browser/chromedriver"
40+ elif 'debian' in platform .linux_distribution ():
41+ #Debian is lowercase when platform.linux_distribution() is used.
42+ #This is not a mistake.
43+ chromedriver_path = "/usr/lib/chromium/chromedriver"
3944else :
4045 # Let's hope it's in the user's path.
4146 chromedriver_path = "chromedriver"
You can’t perform that action at this time.
0 commit comments