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

Python 3 problem in selenium 2.53.0 #1817

Closed
kottenator opened this issue Mar 15, 2016 · 0 comments
Closed

Python 3 problem in selenium 2.53.0 #1817

kottenator opened this issue Mar 15, 2016 · 0 comments

Comments

@kottenator
Copy link

OS: CentOS
Selenium Version: 2.53.0
Browser: PhantomJS
Python Version: 3.4


I've updated my Python Selenium to the latest version 2.53.0 and it doesn't work with Python 3.

When I run tests - I get an error:

../venv/lib/python3.4/site-packages/pytest_selenium/drivers/phantomjs.py:17: in phantomjs_driver
    return PhantomJS(**kwargs)
../venv/lib/python3.4/site-packages/selenium/webdriver/phantomjs/webdriver.py:50: in __init__
    service_args=service_args, log_path=service_log_path)
../venv/lib/python3.4/site-packages/selenium/webdriver/phantomjs/service.py:44: in __init__
    if not self._args_contain("--cookies-file="):
../venv/lib/python3.4/site-packages/selenium/webdriver/phantomjs/service.py:54: in _args_contain
    return len(filter(lambda x:x.startswith(arg), self.service_args)) > 0
TypeError: object of type 'filter' has no len()

To make it work in Python 3 you can do (e.g.): len(list(filter(lambda ...)))

P.S.: I've tried 2.52.0 and it works

rusrushal13 added a commit to rusrushal13/zenodo that referenced this issue Apr 6, 2017
rusrushal13 added a commit to rusrushal13/zenodo that referenced this issue Apr 6, 2017
SeleniumHQ/selenium#1817
As per this issue, it is resolved; updated
@lock lock bot locked and limited conversation to collaborators Aug 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant