I understand the problem is I need to install geckodriver. but my point is your documentation doesn't mention this, and Googling brings up a whole lot of confusing and conflicting information. it wasn't until I tried to open this issue that I got a pointer to the info I needed.
solution? I don't know. I'd say make the pip install selenium fail with an appropriate error message, if no suitable drivers are found. or at a minimum, give a hint in the documentation at https://pypi.python.org/pypi/selenium, before example 0, that geckodriver is a requirement, and give a pointer to https://github.com/mozilla/geckodriver and/or https://github.com/mozilla/geckodriver/releases. thanks.
OS: Debian GNU/Linux
Selenium Version:
Browser:
Browser Version:
jcomeau@aspire:/usr/src$ firefox --version
Mozilla Firefox 45.0
Example 0 on https://pypi.python.org/pypi/selenium should work.
fails at browser = webdriver.Firefox()
(virtualenv) jcomeau@aspire:~/rentacoder/jmol$ (cd molecules && python manage.py shell)
Python 3.5.2 (default, Jul 5 2016, 11:33:36)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
import selenium
selenium.version
'3.0.1'
from selenium import webdriver
browser = webdriver.Firefox()
Traceback (most recent call last):
File "/home/jcomeau/rentacoder/jmol/virtualenv/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 64, in start
stdout=self.log_file, stderr=self.log_file)
File "/usr/lib/python3.5/subprocess.py", line 947, in init
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'geckodriver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "
File "/home/jcomeau/rentacoder/jmol/virtualenv/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 135, in init
self.service.start()
File "/home/jcomeau/rentacoder/jmol/virtualenv/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 71, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
I'd say make the pip install selenium fail with an appropriate error message, if no suitable drivers are found. or at a minimum, give a hint in the documentation at https://pypi.python.org/pypi/selenium, before example 0, that geckodriver is a requirement
I don't like the suggestion of making the install fail, but agree that the documentation should mention that it's necessary to download a driver. This documentation is located here and here if you're interested in helping us to improve this? It would also be good to remove that duplication so we only need to maintain one of those files.
OK, I'll get on it when I get a chance. thanks!
there is one conflict between the two files. do you know offhand which is true: Python3.3+ is supported (from README.rst) or Python3.2+ (from index.rst)?
other than that, they're functionally identical, so I'll choose the best of the cosmetic differences and symlink README.rst to index.rst. then I'll add the mention of the driver being necessary. then I'll submit a pull request.
Perhaps take a look at the revisions for both files and see if one was changed from 3.2 to 3.3, but otherwise I would suspect 3.3 to be more suitable. I'm not sure GitHub or the build/deploy tools will support a symbolic link, but feel free to try.
pull request is #2955. the symlink is working.
Most helpful comment
pull request is #2955. the symlink is working.