seleniumfirefoxgeckodriver

installing geckodriver only using terminal


I am using a headless ubuntu, and want to install latest geckodriver. So I must install by entering a command line. my ubuntu is 14.04 trusty.

But, I don't know the command to install geckodriver. https://github.com/mozilla/geckodriver/

and here are many versions of geckodriver. https://github.com/mozilla/geckodriver/releases I guess I have to download linux32.tar.gz one.

Do I have to include the url of github to write a installing command line?


Solution

  • Run these the commands:

    wget https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-linux64.tar.gz
    

    (You can find the download URL to the latest release of geckodriver on Github.)

    Extract the file with

    tar -xvzf geckodriver*
    

    Make it executable (note this shouldn't be necessary, unless the unzipped file doesn't have the execute bits set):

    chmod +x geckodriver
    

    Add the driver to your PATH in ~/.bashrc so other tools can find it:

    export PATH=$PATH:/path-to-extracted-file/geckodrive