Automated test Environment Deployment steps:
1. Download the installation Python34 and configure the Python environment variables (add Python installation path in path) after download
python:https://www.python.org/
2. Download the third-party installation tool to install Python pip, switch to cmd inside the extracted pip directory, run the Python setup.py install command installation PIP, after installation, enter PIP in the command line to verify whether the installation is successful, If successful, the relevant commands for the PIP are listed, whether the installation fails; the environment variable of the last configuration Pip is a path that is obtained when installing PIP in path: C:\Python34\Lib\site-packages\ Pip-9.0.1-py3.4.egg and C:\Python34\Scripts can do it.
Pip:https://pypi.python.org/pypi/pip
3. Install Selenium:pip install-u (uppercase) Selenium (the latest version selenium3 is installed by default)
4. If you choose Google Browser as the test platform, you will need to install the corresponding driver (Firefox does not install the driver)
Step: First download Install the latest version of Google Chrome
Two. Download the latest version of the Chromedriver.exe driver
Three. Download Drive address: http://blog.csdn.net/huilan_same/article/details/52615123
Key steps: Four. Unzip the downloaded driver package Chromedriver.exe and put it in the application directory under the Google Chrome installation directory (my installation path is: C:\Program files\google\chrome\
Application, depending on the path you installed, then configure the environment variable to add Chromedriver.exe path to Path
5. From Selenium import Webdriver #导入selenium框架包中的webdriver模块
b = Webdriver. Chrome (); #调用webdriver模块中Chrome方法自动打开谷歌浏览器
b Get ("url") #打开你要测试的网址 (Judge Url:b.title or "title" in B.title both ways)
The Webdriver module provides a rich array of APIs for us to invoke, manipulate various elements on the Web page and simulate user actions
All of the above steps seriously, estimate the environment will be able to build a good
Based on the Selenium3+python3.4+chrome (57.8 version) automated test environment setup