Reprinted address: https:? //Www.jianshu.com/p/39716ea15d99 utm_source = oschina-app
Installation selenium
☁ ~ pip3 install selenium
☁ ~ pip3 list selenium
Package Version
---------- -------
pip 18.0
selenium 3.14.0
setuptools 40.2.0
urllib3 1.23
wheel 0.31.1
Installation ChromeDriver
To the official website to view the latest version
View the latest version match the chrome of
View chrome version
According to their own operating system, download the appropriate installation package
You can choose to Taobao mirror Download
Once downloaded, the installation package is added to the environment variable. To mac system, for example, will move to the next chromedriver / usr / bin directory can be
Verifying the Installation
☁ ~ chromedriver
Starting ChromeDriver 2.41.578706 (5f725d1b4f0a4acbf5259df887244095596231db) on port 9515
Only local connections are allowed.
Testing can call chrome
☁ ~ ipython
Python 3.7.0 (default, Aug 22 2018, 15:22:33)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.5.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: from selenium import webdriver In [2]: browser = webdriver.Chrome() In [3]: