Selenium automated combat-based on Python language (environment building)

Source: Internet
Author: User

After reading the "Selenium 2 automated test-based Python language" book, there are some of their own problems, recorded here to facilitate their own inspection, but also hope that you correct or give advice.

Windows environment Setup:

1. Install the Firebug and Firepath front-end tools to help us view the front-end code.

      • Can be directly installed via Firefox add plugin, very convenient
      • Browsers such as IE and chrome typically use F12 to bring up such developer tools

2. Install Python

      • Download the Python installation package via the Python website or by other means, I install the 3.5 64bit version here
      • You can find Python IDLE in your PC's program by installing it.
      • Add system environment variables to python: path in environment variables----Properties-----Advanced settings, computer--
      • After adding an environment variable, open cmd to enter Python into shell mode.

3. Install Pip

      • Python 3.5 already contains Pip, so you don't need to install it, just add the PIP installation directory to the environment variable path, and multiple environment variables are separated by semicolons

4. Installing Selenium

      • Run in cmd: Pip install selenium==2.48.0 to install Selenium
      • After installation, you can use: Pip show selenium to view the version
      • Use: Pip uninstall selenium to uninstall selenium

The Linux (Ubuntu) environment is built:

1. Ubuntu system has been integrated with Python, so it can be used directly: Python into shell mode

2. Install the tool using the sudo apt-get install Python3-setuptools/python3-pip

3. Installing selenium:python3-m pip install Selenium with PIP

Selenium automated combat-based on Python language (environment building)

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.