USB: usb_device_handle_win.cc:1056 Failed to read descriptor from node connection

自动化测试过程中遇到如下报错:
[6452:9780:0415/100836.539:ERROR:device_event_log_impl.cc(214)] [10:08:36.526] USB: usb_device_handle_win.cc:1056 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)

网上查看得知此问题是由Chrome试图读取当前挂起的USB设备的属性而触发的。据说下个chrome版本将会解决此问题。目前暂时没有找到有效方法,只能忽略此报错,实现方法如下:

1 options=webdriver.ChromeOptions()
2 
3 # 忽略无用的日志
4 options.add_experimental_option("excludeSwitches", ['enable-automation', 'enable-logging'])
5 driver=webdriver.Chrome(chrome_options=options)
6 driver.get(r'https://192.168.1.1')

参考1:https://stackoverflow.com/questions/65080685/usb-usb-device-handle-win-cc1020-failed-to-read-descriptor-from-node-connectio
参考2:https://blog.csdn.net/liangjw99/article/details/113886367

posted @ 2021-10-07 17:09  启秀  阅读(2296)  评论(0编辑  收藏  举报