In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will give you a detailed explanation on how to build a Selenium+Python automation script environment. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
1. Build the Python environment 1. Download the installation package
Https://www.python.org/downloads/windows/
After the download is complete, open and install, tick the add path below, and then OK the next step.
2. Verify whether the installation is successful and whether pip is available.
After the installation is successful, open the command window (win+R, enter and exit cmd, enter). Enter python-- version to display the normal version.
Similarly, enter pip-- version to verify whether pip is installed. If prompted that there is no such command or there is an error, execute the following two commands to python-m pip uninstall pip setuptools.
Pip install-upgrade setuptools
3. Install Selenium libraries
Open a command window and type pip install selenium to wait for the installation to complete
Install Google browser and WebDriver1, install Google browser
Https://www.google.cn/intl/zh-CN/chrome/
Download and install it.
2. Download WebDriver
Check the version of the browser you installed first
I have here the 93.0.4 version.
Then go to https://chromedriver.storage.googleapis.com/index.html.
Download the WebDriver corresponding to your browser version (as long as the first three numbers are right)
3. Configure environment variables
First decompress the WebDriver you just downloaded to get an executable file chromedriver
Copy it to the Google browser directory. The default path is C:\ Program Files\ Google\ Chrome if you change it during installation, go to the path you changed.
And then
Right-click my computer-"Properties -" Advanced system Settings-"system Properties -" Advanced-"Environment variable -" user variable Path- Edit-"New -" enter the path you just stored
(for example: C:\ Program Files\ Google\ Chrome)
And then make sure all the time.
4. Verify that WebDriver is installed successfully
Open a command window and enter chromedriver if there is a display of Starting ChromeDriver. A pile of information represents success.
This is the end of this article on "how to build an Selenium+Python automation script environment". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.