1. 安裝 Python 2.7 并設置系統環境變量
?
2. 下載并安裝 python setuptools
Easily download, build, install, upgrade, and uninstall Python packages
https://pypi.python.org/pypi/setuptools#installation-instructions
2.1 找到ez_setup.py,點擊右鍵--目標另存為,存放在C:\Pyhthon27\Scripts
2.2 在cmd命令行下進入ez_setup.py存放的路徑并運行 python ex_setup.py
?3. 下載python安裝包管理工具 pip
The PyPA recommended tool for installing Python packages.
https://pip.pypa.io/en/stable/installing/
3.1 找到get-pip.py, 右鍵另存為,存放在C:\Python27\Scipts
3.2?在cmd命令行下進入get-pip.py存放的路徑并運行 python get-pip.py
?4. 安裝Selenium
在Python 安裝目錄的scripts下面執行pip install -U selenium 安裝selenium
5. 下載安裝測試報告文件包
下載HTMLTestRunner.py放置在Python安裝目錄的Lib目錄下:
http://tungwaiyip.info/software/HTMLTestRunner.html
6. 下載并配置 openpyxl用于操作Excel文件
openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files
https://pypi.python.org/pypi/openpyxl/
下載openpyxl包后解壓, 在解壓目錄(任何地方) 運行cmd python setup.py install
?
7. Webdriver API (Python)
?