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
Update minimum splinter version and remove phantomjs support #110
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in requirements-testing there's a selenium version pinned with <= to support all the browser manipulations
with the latest selenium those stopped working
so this PR forces to update also the selenium
you can try to resolve the root issue of course
i had no luck with it: #100
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.travis.yml also has pinned selenium version
pytest_splinter/plugin.py
Outdated
@@ -322,7 +322,7 @@ def get_args(driver=None, | |||
# https://github.com/mozilla/geckodriver#firefox-capabilities | |||
kwargs['moz:firefoxOptions'] = driver_kwargs.get('moz:firefoxOptions', {}) | |||
kwargs['moz:firefoxOptions']['profile'] = profile.encoded | |||
elif driver in ('phantomjs', 'chrome'): | |||
elif driver in ('chrome'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing trailing comma to be a tuple
@bubenkoff I've skipped the download_file tests, due to the following firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1366035 Disabling the save file dialog will allow the file to download, but the browser hangs afterwards. Also, I had to make a change in patch_webdriver() to use urllib3. I'm not terribly familiar with the inner workings of selenium's RemoteConnection or urllib3's PoolManager, so tell me if I got it wrong. I didn't include any py27 support yet, Do you have a preferred way you want to handle that? Just include urllib3 as a dependency? This gets us down to one error, in |
Add geckodriver to .travis.yml
@bubenkoff And all fixed, although I still need to handle py27 and urllib3. It might be worth it to make this a 1.10.0 or 2.0 to indicate that phantomjs support is gone and we're using up to date selenium and splinter. |
@jsfehler great effort, thank you very much!
about urllib3 for python27, we need to use exactly the same approach as selenium itself (and it uses urlib3 |
Allow passing args to pytest Add MaxRetryError to caught exceptions Add urllib3 to install requirements
@bubenkoff For file downloading, the bug's been open for quite a while now. Anyone using a modern version of Firefox/Selenium/Geckodriver is going to encounter it. While this feature would be broken for anyone using pytest-splinter, it's also broken for everyone. Personally, controlling the browser to download files and verify their presence on disk isn't something I'd do. I'd instead verify the download url on the page, then in another test I'd use requests to download the file and verify the contents. However I wouldn't want to surprise anyone who upgrades pytest-splinter. Up to you if you want to wait or not. Everything's passing on TravisCI, so there's that at least. |
@jsfehler makes total sense to me |
@jsfehler please squash & merge |
@jsfehler had to restart the job so it could report the status |
@jsfehler added you on pypi so you can release it (pls don't forget to make a tag on github) |
@jsfehler please make a 2.0.0 release as there are breaking changes |
@jsfehler ok made it myself, next time please take into account that we're trying to follow major.minor.patch versioning |
@bubenkoff Sorry about that, thanks for cleaning it up so fast. |
Splinter 0.9.0 removes phantomjs support, so pytest-splinter should as well.