1. Install python Ubuntu usually comes with Python, you can view the Python version with the following command:
python–version
If Python is not installed, you can install Python with the following command:
Sudo apt-get Install python 2, installation seleniumSelenium can be installed directly using the Python PIP tool, using the following command:
Pip install–u Selenium
Note: Installing selenium requires root access, which may cause the installation to fail.
If the PIP is not installed, you can install it using the following command:
Sudo apt-get Install Python-pip
Verify:
Use Terminal (terminal) to open Python for verification:
From Selenium import webdirverDriver = wevdirver. Firefox ()Driver.ger (' http://www.baidu.com ')
Selenium's own webdriver does not support chrome and requires a separate download of chromedriver.
3,chromedriver Chromedriver can be downloaded in https://code.google.com/p/selenium/wiki/ChromeDriver, There is also a location guide on the page and different systems need to be placed.
Note: Ubuntu under Chromedriver can be placed directly under the/usr/bin directory;
chromedriver A total of 4 versions, You can choose the version you want.
in-Wall link: Http://yunpan.cn/cKAdEhx3KVhUB Extract code Deae
Ubuntu Installation Selenium