ubuntu环境搭建selenium
Whisper Lv4

Environment

Ubuntu 16.04 LTS

 

install selenium

You can use pip install selenium, maybe specify the version

pip install selenium==3.4.1  

Download ChromeDriver

this website download ChromeDriver.

tip: you must knwon which version the your chrome is, you should download the version that support your chrome.

the latest version is:

Latest Release: ChromeDriver 2.33 Supports Chrome v60-62

when extract the rar file we can get single chromedriver file, then put it in $PATH.

show the path dir:

1
$ echo $PATH

so I will choose /usr/local/bin/

1
sudo mv ./chromedriver /usr/local/bin/

test if it works:

1
$ chromedriver Starting ChromeDriver 2.24.417424 (c5c5ea873213ee72e3d0929b47482681555340c3) on port 9515 Only local connections are allowed.

it starting on port 9515, wow it works.