Python+selenium Environment Construction

Source: Internet
Author: User

First, Python installation:
Download install python, install directory: E:\Auto\Python27


Second, PIP installation:
Enter E:\Auto\Python27\Scripts, click Easy_install-2.7.exe and Pip2.7.exe


Three, the environment variable configuration:
Add E:\auto\python27;e:\auto\python27\scripts in Path


Iv. check python and PIP environment configuration:
CMD box input: Python and pip check if environment variables are configured successfully


Five, Selenium installation:
Installing Selenium,pip install selenium with PIP


Six, check whether the installation of selenium is successful:
CMD---"Python---" from selenium import webdriver etc.


Vii. Generation of reports:
Download htmltestrunner.py into the E:\Auto\Python27\Lib\site-packages directory


Eight, the use of IE for testing:
1) Download IEDriverServer.exe (http://www.seleniumhq.org/download/) and put it in the E:\Auto\Python27 directory
2) Note: Because the Internet Explorer is related to security issues, so the protection mode to remove all, operation mode: Set
"Internet Options---" security--"lnternet/local intranet/trusted sites/restric
Ted Sites---Remove the hook from the front of enable Protected mode, respectively
3) Google Drive 32-bit: http://chromedriver.storage.googleapis.com/index.html


Nine, the use of Google, Firefox testing, do not need to install browser driver, direct download installation Geckodriver
The download path is: https://github.com/mozilla/geckodriver/releases
How to use: Place the downloaded Geckodriver.exe under the installation Firefox path, such as (C:\Program Files (x86) \mozilla Firefox)

Python+selenium Environment Construction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.