1# For Linux, but it is similar for Windows
2# First make sure first that you have chrome browser installed on your system.
3
4# a simple way to get the driver is:
5sudo apt-get install chromium-chromedriver
6# this will download 75MB of files.
7
8# another way is:
91. Download the lastest version of driver from:
10 https://sites.google.com/a/chromium.org/chromedriver/ # only 5-7MB
112. Unzip the file.
123. Paste the file in /usr/local/bin using this command:
13 sudo mv chromedriver /usr/local/bin # this makes sure that the directory is in your PATH variable.
144. Make your file executable:
15 sudo chmod +x /usr/local/bin/chromedriver
16
17Now you can use this in python:
18 >>from selenium import webdriver
19 >>browser = webdriver.Chrome()
20 # it will work fine
1import timefrom selenium import webdriverdriver = webdriver.Chrome('/path/to/chromedriver') # Optional argument, if not specified will search path.driver.get('http://www.google.com/');time.sleep(5) # Let the user actually see something!search_box = driver.find_element_by_name('q')search_box.send_keys('ChromeDriver')search_box.submit()time.sleep(5) # Let the user actually see something!driver.quit()