This is naive question but how does one add firefox to the system PATH on a Amazon Web Service Linux instance? I should clarify that I installed firefox to /home/firefox instead of /usr/bin. Thanks! I am currently getting the following error when I try to load the firefox webdriver (after importing selenium):
>>> driver = webdriver.Firefox()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 64, in __init__
self.binary = capabilities.get("binary") or FirefoxBinary()
File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 47, in __init__
self._start_cmd = self._get_firefox_start_cmd()
File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 163, in _get_firefox_start_cmd
" Please specify the firefox binary location or install firefox")
RuntimeError: Could not find firefox in your system PATH. Please specify the firefox binary location or install firefox
Add the following to your ~/.profile:
export PATH="$PATH:/home/firefox"
Or to ~/.bashrc, or ~/.bash_profile, if the shell is Bash.
See Shell initialization files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With