No such file or directory: 'geckodriver' for a Python simple Selenium application

前端 未结 3 672
清歌不尽
清歌不尽 2021-02-11 12:31

I\'m running a simple example of selenium on Linux:

from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Firefox()
         


        
3条回答
  •  旧时难觅i
    2021-02-11 13:26

    I faced same issue in Linux. I used below steps to fix that Error.

    cd /bin
    
    # Check on https://github.com/mozilla/geckodriver/releases for the latest release
    wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux32.tar.gz
    tar -xvzf geckodriver-v0.24.0-linux32.tar.gz
    rm geckodriver-v0.24.0-linux32.tar.gz
    chmod +x geckodriver
    export PATH=$PATH:/bin/geckodriver
    
    geckodriver --version
    

    Note : I tried with latest version geckodriver-v0.26.0 but it not working for me, That's Why I installed the old version v0.24.0

提交回复
热议问题