Skip to content

Commit 969eea9

Browse files
authored
Merge pull request #461 from seleniumbase/firefox-linux-updates
Firefox WebDriver Linux updates
2 parents 1fee1e9 + ee60ef4 commit 969eea9

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pip>=19.3.1
2-
setuptools>=43.0.0
2+
setuptools>=44.0.0
33
setuptools-scm>=3.3.3
44
wheel>=0.33.6
55
six==1.13.0
@@ -38,7 +38,7 @@ pymysql==0.9.3
3838
pyotp==2.3.0
3939
boto==2.49.0
4040
cffi>=1.13.2
41-
tqdm>=4.41.0
41+
tqdm>=4.41.1
4242
flake8==3.7.9
4343
certifi>=2019.11.28
4444
pdfminer.six==20191110

seleniumbase/core/browser_launcher.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,8 @@ def get_local_driver(
516516
options = webdriver.FirefoxOptions()
517517
if headless:
518518
options.add_argument('-headless')
519+
firefox_capabilities['moz:firefoxOptions'] = (
520+
{'args': ['-headless']})
519521
if LOCAL_GECKODRIVER and os.path.exists(LOCAL_GECKODRIVER):
520522
try:
521523
make_driver_executable_if_not(LOCAL_GECKODRIVER)
@@ -530,15 +532,20 @@ def get_local_driver(
530532
" Installing now:")
531533
try:
532534
sb_install.main(override="geckodriver")
533-
except Exception:
534-
print("\nWarning: Could not install geckodriver!")
535+
except Exception as e:
536+
print("\nWarning: Could not install geckodriver: "
537+
"%s" % e)
535538
sys.argv = sys_args # Put back the original sys args
536-
firefox_driver = webdriver.Firefox(
537-
firefox_profile=profile,
538-
capabilities=firefox_capabilities,
539-
options=options)
540-
except WebDriverException:
541-
# Skip Firefox options and try again
539+
if "linux" in PLATFORM or not headless:
540+
firefox_driver = webdriver.Firefox(
541+
firefox_profile=profile,
542+
capabilities=firefox_capabilities)
543+
else:
544+
firefox_driver = webdriver.Firefox(
545+
firefox_profile=profile,
546+
capabilities=firefox_capabilities,
547+
options=options)
548+
except Exception:
542549
profile = _create_firefox_profile(
543550
downloads_path, proxy_string, user_agent, disable_csp)
544551
firefox_capabilities = DesiredCapabilities.FIREFOX.copy()

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
setup(
4747
name='seleniumbase',
48-
version='1.34.10',
48+
version='1.34.11',
4949
description='Fast, Easy, and Reliable Browser Automation & Testing.',
5050
long_description=long_description,
5151
long_description_content_type='text/markdown',
@@ -121,7 +121,7 @@
121121
'pyotp==2.3.0',
122122
'boto==2.49.0',
123123
'cffi>=1.13.2',
124-
'tqdm>=4.41.0',
124+
'tqdm>=4.41.1',
125125
'flake8==3.7.9',
126126
'certifi>=2019.11.28',
127127
'pdfminer.six==20191110',

0 commit comments

Comments
 (0)