In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)05/31 Report--
Xiaobian to share with you Selenium code migration often appear error problems, I believe most people do not know how, so share this article for your reference, I hope you read this article after a lot of gains, let us go to understand it!
Scenario: I wrote a part of the script in the home environment at the front end, and delayed it for a while. Recently, I wanted to start it again in the unit, so a series of error problems appeared after the code was tested in the unit environment. These problems are summarized as follows.
1.build failed, indicating "unable to find an ant file to run"
Solution: I used Method 2 to solve successfully
Cause of the problem: When I copied this file from computer A to computer B, the lack of the corresponding file caused
Python has "No module named "XXX".
The reason for this problem:
1. No pip files installed in environment
2. Installed, environment path error
The solution is as follows:
First execute the upgrade command to upgrade to the latest
python -m pip install -U pip
Then go to the site-packages directory and look for pip packages
Check whether the compilation environment can find the path of the package installed by itself. Make sure it is the directory under the folder.
3.Non-UTF-8 code starting with '\xc4'
Solution (1): Add a statement at the top of the program,# coding=gbk
Solution (2): Modify under preference
4. ocr error tesseract is not installed
This is a problem encountered both at initial compile time and later when debugging environment changes.
Solution: The reason for the problem is that the default path location in the source code is different from the file location, and needs to be changed.
7. If the drop-down menu's content item prompt cannot be located, you can try move_to_element() method to proceed.
Drop-down box is the mouse moved up directly pop-up, then we can use move_to_element() to operate
8. List index out of range python
Later, I thought about it, because the new window did not open, so there is no window 2, so the prompt list is out of range, I feel a little enlightened
9. Enter the third-level page prompt 503 Service Temporarily Unavailable, if the manual refresh page reloads successfully
The Internet looks at how to configure and why, but does not tell how to solve it.
So I thought, if that's the case, performing a refresh operation should circumvent this problem.
Statement: driver.refresh()
The above is "Selenium code migration often appear error problems what" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!
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.