---restore content starts---
environment construction under WINDOW10
1. Install Python
https://www.python.org/downloads/Download the latest version of Python under this URL, click Install, select Add Python path to PATH environment variable during installation
2. Installing Setuptools and Pip
Setuptools makes it easier to create and publish Python packages, especially if you have dependencies on other packages
Pip is a tool for installing and managing Python packages, installation relies on Setuptools, and using the PIP command to better install Python third-party libraries
3. Installing Selenium
Enter PIP install selenium on the cmd command line to install Selenuim
4. I'm using pycharm for encoding.
Some of the pits encountered
1. Run a small example with Webdriver to meet the pit below
Selenium is a big change from the previous one, one of which is that Webdriver is separated from the browser and needs to be installed separately
Download : https://github.com/mozilla/geckodriver/releases
Unzip: Customize an address, remember that address
Environment variables: Add decompressed addresses to environment variables
2. Baidu a lot, finally thought to solve this problem, but found another problem, session creation exception
Tears ran, find a lot of information, just know is to follow the current download the highest version of the Geckodriver, nonsense not to say, download the previous version, find a 15.0 version of the reinstallation
At this point, the program can run.
Python+selenium environment construction and the pits encountered