Sto usando Ubuntu 16.04.1 LTS. Esecuzione di python -Vresi Python 2.7.12. Sto costruendo un virtual off di quello per installare il pacchetto Selenium tramite:
pip install -upgrade selenium
Ma quando si esegue una versione di prova con il seguente script Python:
from selenium import webdriver
browser = webdriver.Firefox()
browser.get('http://seleniumhq.org/')
risulta questo errore:
Traceback (most recent call last):
File "/home/myuser/bin/selenium-experiment.py", line 2, in <module>
browser = webdriver.Firefox()
File "/home/myuser/python_virtualenv/local/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 135, in __init__
self.service.start()
File "/home/myuser/python_virtualenv/local/lib/python2.7/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.
Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.firefox.service.Service object at 0x7f782c1caa50>> ignored
Poiché geckodriverè un eseguibile, ho concluso che dovrebbe essere fornito dall'installazione del pacchetto di selenio tramite pipo almeno un errore con qualche messaggio che indica cosa devo fare dopo. Apparentemente no, quindi ho approfondito: ho pensato che forse Ubuntu avrebbe dovuto avere un pacchetto che fornisce l' geckodrivereseguibile, quindi cercavo e non ho apt-file search geckodrivertrovato risultati.
Dove trovo questo geckodrivereseguibile?