Skip to content
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

Selenium tests don't work with firefox #130

Open
rlconley opened this issue Oct 21, 2016 · 0 comments
Open

Selenium tests don't work with firefox #130

rlconley opened this issue Oct 21, 2016 · 0 comments

Comments

@rlconley
Copy link
Contributor

rlconley commented Oct 21, 2016

Right now, the selenium tests break using firefox. making them work would require using Marionette, and then would require more changes when Selenium 3.0 (now in Beta) is released. (https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver)

Switching the tests to use chrome seems like the safest option, as requiring the user to go through the suggested downloading of the geckodriver executable or changing their version of FF seems impractical.

Here's the error I get with firefox:

`ERROR: test_editor (scribbler.tests.test_views.FunctionalTestCase)

Traceback (most recent call last):
File "/home/rlconley/PycharmProjects/django-scribbler-sandbox/scribbler/tests/test_views.py", line 410, in setUp
self.browser = webdriver.Firefox()
File "/home/rlconley/.virtualenvs/scribbler110/local/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 80, in init
self.binary, timeout)
File "/home/rlconley/.virtualenvs/scribbler110/local/lib/python2.7/site-packages/selenium/webdriver/firefox/extension_connection.py", line 52, in init
self.binary.launch_browser(self.profile, timeout=timeout)
File "/home/rlconley/.virtualenvs/scribbler110/local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser
self._wait_until_connectable(timeout=timeout)
File "/home/rlconley/.virtualenvs/scribbler110/local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 108, in _wait_until_connectable
% (self.profile.path))
WebDriverException: Message: Can't load the profile. Profile Dir: /tmp/tmp17Jj4s If you specified a log_file in the FirefoxBinary constructor, check it for details.
`

And here's the suggested fix using Marionette:

SeleniumHQ/selenium#2739

However, if we were to switch to Chrome, installing chromedriver on Travis is difficult, since it's not packaged. It's a link to an exe on the web that you have to install and then move. There are some workarounds like this https://github.com/kmee/odoo-travis-robotframework/blob/master/.travis.yml , but that seems brittle, too.

travis-ci/travis-ci#272

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant