Skip to content

Commit 17e2285

Browse files
authored
Merge pull request #186 from seleniumbase/fix-chromedriver-version
Fix chromedriver install script
2 parents ac6f501 + 3f75b69 commit 17e2285

File tree

4 files changed

+18
-15
lines changed

4 files changed

+18
-15
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ language: python
22
sudo: false
33
python:
44
- "2.7"
5-
- "3.6"
5+
- "3.5"
66
addons:
7-
firefox: "58.0"
7+
firefox: "60.0"
88
chrome: stable
99
before_install:
1010
- "sudo mysql -e 'CREATE DATABASE IF NOT EXISTS test_db;'"

console_scripts/sb_install.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,23 @@ def main():
8282
else:
8383
raise Exception("Cannot determine which version of Chromedriver "
8484
"to download!")
85-
86-
# latest_version = requests.get(
87-
# "http://chromedriver.storage.googleapis.com/LATEST_RELEASE").text
88-
#
89-
# ### Chromedriver 2.41 / latest may have issues. Forcing 2.40 for now.
9085
latest_version = "2.40"
9186
download_url = ("http://chromedriver.storage.googleapis.com/"
9287
"%s/%s" % (latest_version, file_name))
93-
print('\nLocating the latest version of Chromedriver...')
94-
if not requests.get(download_url).ok:
95-
# If there's a problem with the latest Chromedriver, fall back
96-
fallback_version = "2.40"
97-
download_url = ("http://chromedriver.storage.googleapis.com/"
98-
"%s/%s" % (fallback_version, file_name))
99-
print("Found %s" % download_url)
88+
# Chromedriver 2.41 (latest) may have issues. Forcing 2.40 for now.
89+
get_latest = False
90+
if get_latest:
91+
last = "http://chromedriver.storage.googleapis.com/LATEST_RELEASE"
92+
print('\nLocating the latest version of Chromedriver...')
93+
latest_version = requests.get(last).text
94+
if not requests.get(download_url).ok:
95+
fallback_version = "2.40"
96+
download_url = ("http://chromedriver.storage.googleapis.com/"
97+
"%s/%s" % (fallback_version, file_name))
98+
else:
99+
download_url = ("http://chromedriver.storage.googleapis.com/"
100+
"%s/%s" % (latest_version, file_name))
101+
print("Found %s" % download_url)
100102
elif name == "geckodriver" or name == "firefoxdriver":
101103
latest_version = "v0.21.0"
102104
if "darwin" in sys_plat:

examples/boilerplates/samples/bing_objects.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Bing.com page objects as CSS selectors
33
'''
44

5+
56
class Page(object):
67
logo_box = '#sbox div[class*=logo]'
78
search_box = 'input.b_searchbox'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name='seleniumbase',
10-
version='1.13.5',
10+
version='1.13.6',
1111
description='Web Automation & Testing Framework - http://seleniumbase.com',
1212
long_description='Web Automation and Testing Framework - seleniumbase.com',
1313
platforms='Mac * Windows * Linux * Docker',

0 commit comments

Comments
 (0)