Python is a 3.5,chrome browser version in early 17.
1.chromedriver
Download a chromedriver in http://chromedriver.storage.googleapis.com/index.html?path=2.30/, unzip the exe paste into the chrome installation path, Generally in program Files (x86) \google\chrome\application
2. Installing the Selenium Library
Open the console and enter the command: Pip install Selenium
If PIP is not installed, then search keywords: python pip installation
3. A little Demo
Can be under each Pycharm community version to use, write code has smart tips, very convenient
1 #coding = Utf-82 3 fromSeleniumImportWebdriver4Chromedriver ="C:\Program Files (x86) \google\chrome\application\chromedriver"5Browser =Webdriver. Chrome (Chromedriver)6Browser.get ('http:\\www.baidu.com')7BROWSER.FIND_ELEMENT_BY_ID ('kw'). Send_keys ('Selenium')8BROWSER.FIND_ELEMENT_BY_ID ('su'). Click ()9Browser.quit ()
View Code
The program executes slowly, but it turns off, so you can comment out the last line of the process: #
Browser.quit ()
Reference Example:
1.http://blog.csdn.net/yangyangrenren/article/details/54137041
2.https://www.cnblogs.com/buchiany/p/6379305.html
Selenium+python Automation Test (i) environment