Closed ramonmedeiros closed 4 years ago
Hello @ramonmedeiros this is expected behavior. As I mention at the top of the README, if you are running as root it will download and install the webdriver binaries into /usr/local/bin, otherwise it will be under $HOME/bin. For most users, the $HOME/bin directory will not be in your PATH by default. I will update the README to better highlight the fact that modifications to the PATH should be explicitly done by the end user as I personally would be very concerned about security if a tool or library I was using made changes to the PATH.
What you can do if the downloaded webdriver is not in the path is capture the return value of either the download() or download_and_install() methods and pass the path to the binary to the webdriver constructor. Here's the link to the documentation for the Firefox driver. You'll want to use the executable_path parameter:
https://selenium-python.readthedocs.io/api.html#module-selenium.webdriver.firefox.webdriver
So something like this should get you what you are looking for:
downloader = GeckoDriverDownloader()
_, geckodriver_path = downloader.download_and_install()
driver = webdriver.Firefox(executable_path=geckodriver_path)
Hope that helps!
Amazing. Sorry for not reading the docs
Hey,
first of all, amazing job with this project. I have been using
chromedriver_binary
, but as I searched for firefox, I ended up seeing your project.I saw this behaviour:
So, should I do something more to put on path?