In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Environment:
OS:Windows 10 17134
Python:3.4.4
Selenium:3.13.0
Browser:68.0.3440.84 (official version) (64-bit)
ChromeDriver:2.41
Content of the script:
#-*-coding: utf-8-*-"" Test selenium webdriver "import timefrom selenium import webdriverdef test (): driver = webdriver.Chrome () driver.get ('http://www.google.com/xhtml') time.sleep (5) # Let the user actually see something! Search_box = driver.find_element_by_name ('q') search_box.send_keys ('ChromeDriver') search_box.submit () time.sleep (5) # Let the user actually see something! Driver.quit () if _ _ name__ = ='_ _ main__': test ()
Phenomenon:
The script executes normally and the script function executes correctly, but the command line output has an error message.
The error message is as follows:
[17672:21484:0802/155619.485:ERROR:install_util.cc] Failed to read HKLM\ SOFTWARE\ Policies\ Google\ Chrome\ MachineLevelUserCloudPolicyEnrollmentToken: the system cannot find the specified file. (0x2)
A variety of solutions available online:
1. Upgrade selenium version to latest-confirmed, invalid
2.chromium 's bug reports that upgrade chrome to 68.0.3433.0 or above and use the corresponding version of ChromeDriver-confirmed, invalid
The recommendation "(Python only) include the path to ChromeDriver when instantiating webdriver.Chrome" in the 3.ChromeDriver instructions-confirmed, invalid
4. Run "reg add HKLM\ SOFTWARE\ Policies\ Google\ Chrome / v MachineLevelUserCloudPolicyEnrollmentToken / t REG_SZ" to add the registry value prompted in the error message-confirmed and valid.
Conclusion:
1. You can manually increase this registry value in regedit
two。 You can increase this registry value through the .reg file.
3. You can increase this registry value using the command line.
Reference website:
Https://github.com/SeleniumHQ/selenium/issues/5966
Https://bugs.chromium.org/p/chromium/issues/detail?id=848232
Http://chromedriver.chromium.org/getting-started
This article is originally published on the official account "sylan215", ten years to test the original practical information of veterans, follow me, rise posture!
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.