尝试用webdriver.Chrome()
打开chrome浏览器时,返回错误:
DevTools listening on ws://127.0.0.1:49645/devtools/browser/3c3d566d-8283-456e-9cae-4de285cd025e
PS C:UsersStellanttDesktopSelenium> [7896:6536:1114/074848.328:ERROR:chrome_browser_main_extra_parts_metrics.cc(230)] crbug.com/1216328: Checking Bluetooth availability started. Please report if there is no report that this ends.
[7896:6536:1114/074848.328:ERROR:chrome_browser_main_extra_parts_metrics.cc(233)] crbug.com/1216328: Checking Bluetooth availability ended.
[7896:6536:1114/074848.328:ERROR:chrome_browser_main_extra_parts_metrics.cc(236)] crbug.com/1216328: Checking default browser status started. Please report if there is no
report that this ends.
[7896:6208:1114/074848.334:ERROR:device_event_log_impl.cc(214)] [07:48:48.334] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device
attached to the system is not functioning. (0x1F)
[7896:6536:1114/074848.342:ERROR:chrome_browser_main_extra_parts_metrics.cc(240)] crbug.com/1216328: Checking default browser status ended.
[4920:3584:1114/075045.724:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is disabled, ANGLE is
当我使用选项来修复它时:
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(options=options)
它什么也没回,终止了我的进程。
如何解决此错误?
这些错误消息。。。
PS C:UsersStellanttDesktopSelenium> [7896:6536:1114/074848.328:ERROR:chrome_browser_main_extra_parts_metrics.cc(230)] crbug.com/1216328: Checking Bluetooth availability started. Please report if there is no report that this ends.
[7896:6536:1114/074848.328:ERROR:chrome_browser_main_extra_parts_metrics.cc(233)] crbug.com/1216328: Checking Bluetooth availability ended.
[7896:6536:1114/074848.328:ERROR:chrome_browser_main_extra_parts_metrics.cc(236)] crbug.com/1216328: Checking default browser status started. Please report if there is no
report that this ends.
[7896:6208:1114/074848.334:ERROR:device_event_log_impl.cc(214)] [07:48:48.334] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device
attached to the system is not functioning. (0x1F)
[7896:6536:1114/074848.342:ERROR:chrome_browser_main_extra_parts_metrics.cc(240)] crbug.com/1216328: Checking default browser status ended.
[4920:3584:1114/075045.724:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is disabled, ANGLE is
是一个通用错误的结果,因为参数化测试由于在启动时记录昂贵指标的超时而变得不稳定
这些错误/警告不会影响测试执行,您现在可以忽略它们。
参考
您可以在中找到相关的详细讨论
- 问题1216328:由于在启动时记录昂贵指标时超时,参数化测试很不稳定