Home > Backend Development > Python Tutorial > Why Does Chrome v87 Cause USB Communication Errors with Selenium in Windows 10?

Why Does Chrome v87 Cause USB Communication Errors with Selenium in Windows 10?

Barbara Streisand
Release: 2024-11-08 14:08:01
Original
631 people have browsed it

Why Does Chrome v87 Cause USB Communication Errors with Selenium in Windows 10?

USB Communication Issues in Chrome v87 with Selenium in Windows 10

Recently, users have encountered an error with Chrome Driver v87 and Chrome v87 concerning USB communication:

[ERROR:device_event_log_impl.cc(211)] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)

Impact of Chrome Update on USB Communication

This error indicates a change in how Chrome manages USB connections. As a result, even basic selenium scripts are triggering this error.

Resolution: Suppressing Error Messages

While this error does not affect the functionality of Selenium scripts, it can be annoying. To suppress these error messages, you can use an experimental option:

options.add_experimental_option('excludeSwitches', ['enable-logging'])
Copy after login

Updated Code Block

from selenium import webdriver

options = webdriver.ChromeOptions() 
options.add_argument("start-maximized")
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(options=options, executable_path=r'C:\WebDrivers\chromedriver.exe')
driver.get('https://www.google.com/')
Copy after login

Conclusion

This workaround suppresses the error messages by disabling logging in Chrome. Although it doesn't resolve the actual issue with USB communication, it provides a way to enjoy a cleaner console output while using Selenium with the latest versions of Chrome and Chrome Driver.

The above is the detailed content of Why Does Chrome v87 Cause USB Communication Errors with Selenium in Windows 10?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template