Skip to content

Commit f781e98

Browse files
authored
Merge pull request #854 from seleniumbase/update-firefox-settings
Update Firefox settings on Linux and update dependencies
2 parents 907b1ed + 6e85a7e commit f781e98

File tree

5 files changed

+28
-10
lines changed

5 files changed

+28
-10
lines changed

docs/requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
regex>=2021.3.17
2-
tqdm>=4.59.0
1+
regex>=2021.4.4
2+
tqdm>=4.60.0
33
livereload==2.6.3;python_version>="3.6"
44
joblib==1.0.1;python_version>="3.6"
55
Markdown==3.3.4
6+
docutils==0.17
67
Jinja2==2.11.3
78
readme-renderer==29.0
89
pymdown-extensions==8.1.1

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ py==1.8.1;python_version<"3.5"
3333
py==1.10.0;python_version>="3.5"
3434
pytest==4.6.11;python_version<"3.5"
3535
pytest==6.1.2;python_version>="3.5" and python_version<"3.6"
36-
pytest==6.2.2;python_version>="3.6"
36+
pytest==6.2.3;python_version>="3.6"
3737
pytest-forked==1.3.0
3838
pytest-html==1.22.1;python_version<"3.6"
3939
pytest-html==2.0.1;python_version>="3.6"
@@ -79,7 +79,7 @@ toml==0.10.2
7979
Pillow==6.2.2;python_version<"3.5"
8080
Pillow==7.2.0;python_version>="3.5" and python_version<"3.6"
8181
Pillow==8.2.0;python_version>="3.6"
82-
rich==10.0.1;python_version>="3.6" and python_version<"4.0"
82+
rich==10.1.0;python_version>="3.6" and python_version<"4.0"
8383
tornado==5.1.1;python_version<"3.5"
8484
tornado==6.1;python_version>="3.5"
8585
pdfminer.six==20191110;python_version<"3.5"

seleniumbase/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "1.59.5"
2+
__version__ = "1.59.6"

seleniumbase/core/browser_launcher.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def _set_firefox_options(
381381
options.set_preference("security.csp.enable", False)
382382
options.set_preference(
383383
"browser.download.manager.showAlertOnComplete", False)
384-
if headless:
384+
if headless and "linux" not in PLATFORM:
385385
options.add_argument("--headless")
386386
if locale_code:
387387
options.set_preference("intl.accept_languages", locale_code)
@@ -579,6 +579,11 @@ def get_remote_driver(
579579
downloads_path, headless, locale_code,
580580
proxy_string, user_agent, disable_csp)
581581
capabilities = firefox_options.to_capabilities()
582+
capabilities['marionette'] = True
583+
if "linux" in PLATFORM:
584+
if headless:
585+
capabilities['moz:firefoxOptions'] = (
586+
{'args': ['-headless']})
582587
for key in desired_caps.keys():
583588
capabilities[key] = desired_caps[key]
584589
warnings.simplefilter("ignore", category=DeprecationWarning)
@@ -703,7 +708,19 @@ def get_local_driver(
703708
"%s" % e)
704709
sys.argv = sys_args # Put back the original sys args
705710
warnings.simplefilter("ignore", category=DeprecationWarning)
706-
return webdriver.Firefox(options=firefox_options)
711+
if "linux" in PLATFORM:
712+
from selenium.webdriver.common.desired_capabilities import (
713+
DesiredCapabilities)
714+
firefox_capabilities = DesiredCapabilities.FIREFOX.copy()
715+
firefox_capabilities['marionette'] = True
716+
if headless:
717+
firefox_capabilities['moz:firefoxOptions'] = (
718+
{'args': ['-headless']})
719+
return webdriver.Firefox(
720+
capabilities=firefox_capabilities,
721+
options=firefox_options)
722+
else:
723+
return webdriver.Firefox(options=firefox_options)
707724
elif browser_name == constants.Browser.INTERNET_EXPLORER:
708725
if not IS_WINDOWS:
709726
raise Exception(

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
print("\n*** Installing twine: *** (Required for PyPI uploads)\n")
5252
os.system("python -m pip install --upgrade 'twine>=1.15.0'")
5353
print("\n*** Installing tqdm: *** (Required for PyPI uploads)\n")
54-
os.system("python -m pip install --upgrade 'tqdm>=4.59.0'")
54+
os.system("python -m pip install --upgrade 'tqdm>=4.60.0'")
5555
print("\n*** Publishing The Release to PyPI: ***\n")
5656
os.system('python -m twine upload dist/*') # Requires ~/.pypirc Keys
5757
print("\n*** The Release was PUBLISHED SUCCESSFULLY to PyPI! :) ***\n")
@@ -139,7 +139,7 @@
139139
'py==1.10.0;python_version>="3.5"',
140140
'pytest==4.6.11;python_version<"3.5"',
141141
'pytest==6.1.2;python_version>="3.5" and python_version<"3.6"',
142-
'pytest==6.2.2;python_version>="3.6"',
142+
'pytest==6.2.3;python_version>="3.6"',
143143
'pytest-forked==1.3.0',
144144
'pytest-html==1.22.1;python_version<"3.6"',
145145
'pytest-html==2.0.1;python_version>="3.6"',
@@ -185,7 +185,7 @@
185185
'Pillow==6.2.2;python_version<"3.5"',
186186
'Pillow==7.2.0;python_version>="3.5" and python_version<"3.6"',
187187
'Pillow==8.2.0;python_version>="3.6"',
188-
'rich==10.0.1;python_version>="3.6" and python_version<"4.0"',
188+
'rich==10.1.0;python_version>="3.6" and python_version<"4.0"',
189189
'tornado==5.1.1;python_version<"3.5"',
190190
'tornado==6.1;python_version>="3.5"',
191191
'pdfminer.six==20191110;python_version<"3.5"',

0 commit comments

Comments
 (0)