I'm doing a TDD tutorial on Django and selenium. I'm using Ubuntu and the first part is to run the following code:
from selenium import webdriver
browser = webdriver.Firefox()
browser.get('http://localhost:8000')
assert 'Django' in browser.title
When I run the file, it returns the following:
Traceback (most recent call last):
File "functional_test.py", line 3, in <module>
browser = webdriver.Firefox()
File "/home/jorge/Documents/envdjango/gogoat/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 142, in __init__
self.service.start()
File "/home/jorge/Documents/envdjango/gogoat/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 74, 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)
NotADirectoryError: [Errno 20] Not a directory
From what I understand the error is from selenium that fails to find the geckodrive, I had some approximations (I tried this link )
I'm running everything in a virtualenv and these are the versions that pip freeze
gives:
Django==1.11.2
selenium==3.4.3
Ubuntu==16.04.2 LTS