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)