install chromedriver code example
Example 1: how to install chromedriver on linux
To install chromedriver:
$ sudo apt-get install unzip
$ wget -N http://chromedriver.storage.googleapis.com/2.29/chromedriver_linux64.zip -P ~/Downloads
$ unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads
$ sudo mv -f ~/Downloads/chromedriver /usr/local/share/
$ sudo chmod +x /usr/local/share/chromedriver
$ sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
$ sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
It will be succesfully installed
To find the path write:
$ whereis chromedriver
Example 2: chromedriver selenium python
sudo apt-get install chromium-chromedriver
1. Download the lastest version of driver from:
https://sites.google.com/a/chromium.org/chromedriver/
2. Unzip the file.
3. Paste the file in /usr/local/bin using this command:
sudo mv chromedriver /usr/local/bin
4. Make your file executable:
sudo chmod +x /usr/local/bin/chromedriver
Now you can use this in python:
>>from selenium import webdriver
>>browser = webdriver.Chrome()
Example 3: selenium chrome python
import timefrom selenium import webdriverdriver = webdriver.Chrome('/path/to/chromedriver')