-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--firefox-preferences option is not working properly #86
Comments
Can you try |
Hi. |
Wow, that's a lot of options to add! You can also override the import pytest
@pytest.fixture
def firefox_profile(firefox_profile):
firefox_profile.set_preference('plugin.state.java', '2')
firefox_profile.set_preference('offline-apps.quota.warn', '5120000')
...
return firefox_profile Note that soon you will be able to set preferences via capabilities. At that point I'm likely to deprecate the import pytest
@pytest.fixture
def capabilities(capabilities):
capabilities['moz:firefoxOptions'] = {
'prefs': {
'plugin.state.java': '2'.
'offline-apps.quota.warn': '5120000'}}
return capabilities For your original issue, this is likely a bug in pytest, so please raise a new issue here: https://github.com/pytest-dev/pytest |
Thanks a lot. it works! i wil report a bug to pytest. |
When trying to use --firefox-preference from command line or from pytest.ini like this:
"C:\automated_test_scripts\tests>pytest -v -s --firefox-preference="browser.helperApps.neverAsk.openFile"="application/excel" test_login.py"
i got error:
usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: argument --firefox-preference: expected 2 argument(s).
I tried different combination and all the time i got the same error.
I using a synthax in command line from >pytest -h
The text was updated successfully, but these errors were encountered: