Conversation
tests/selenium/pbtest.py
Outdated
| self.js = self.driver.execute_script | ||
|
|
||
| super(PBSeleniumTest, self).run(result) | ||
| if result._excinfo: |
There was a problem hiding this comment.
This is a dirty hack to get a nice @repeat_if_failed decorator working. It only works with pytest. It should be removed once the tests are more consistent.
|
Firefox tests pass! 🎉 🎈 The pbtest.py stuff could be cleaned up some. But this is mostly ready for review. |
|
Green checks! ✓✓✓✓✓✓✓✓✓✓✓✓✓ |
| status of "undefined" and any tests not visible to the user.""" | ||
| suite and assert that none of the tests failed or are 'undefined'.""" | ||
|
|
||
| @pbtest.repeat_if_failed(5) |
There was a problem hiding this comment.
This test now gets re-run if it fails.
There was a problem hiding this comment.
So now instead of the whole test suite getting re-run for this flaky test, only tests with this decorator get re-run. Which should greatly improve the speed of the travis runs.
| return origin in supercookieDomains | ||
|
|
||
| @pbtest.repeat_if_failed(5) | ||
| def test_should_detect_ls_of_third_party_frame(self): |
There was a problem hiding this comment.
This also gets re-run.
|
|
||
|
|
||
| @unittest.skipIf(os.environ.get('BROWSER') == 'firefox', | ||
| "selenium move_to is currently broken in firefox") |
There was a problem hiding this comment.
I'll make an issue to eventually remove this once this PR is merged.
|
Wow this is a huge PR and a huge amount of work! I just gave it a first pass and all is looking well so far, I'll take a second pass at it right now. |
|
This looks good to me. @ghostwords might want to take a second look, but I'm going to merge for now. Any other fixes can happen in follow pull requests AFAIC. Thanks! |
Currently the support for FireFoxe's WebExtensions in selenium is lacking. As of today there is no way to install a WebExtension #1181 with selenium, or geckodriver #211. Fortunately there is a way to install them using
web-ext.The strategy in this PR is to get selenium working for us:
web-extgeckodriverto the running instance of firefoxselenium.webdirver.Remotetogeckodriverxvfbso we can run it on traviscloses #1009 🎉
I was experimenting with
xvfbearlier today, so that step might not be too hard.Have y'all seen anyone else who has this working yet? This solution is kind of a hack, but it is only temporary until selenium gets up to speed.