本文介绍了如何修复[1573451709.039] [警告]:使用chrome版本78和chrome驱动程序版本78.0.3904.70时,连接到Chrome超时,正在重试...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Chrome浏览器已更新到版本78,当我尝试执行任何自动化代码时,它会显示错误

My Chrome browser is updated to version 78 and when I tried to execute any code of automation, it shows the error

Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[1573451703.668][WARNING]: Timed out connecting to Chrome, retrying...
Nov 11, 2019 11:25:05 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
[1573451709.039][WARNING]: Timed out connecting to Chrome, retrying...

我该如何解决?

推荐答案

此错误消息...

Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[1573451703.668][WARNING]: Timed out connecting to Chrome, retrying...
Nov 11, 2019 11:25:05 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
[1573451709.039][WARNING]: Timed out connecting to Chrome, retrying...

...表示 ChromeDriver 无法启动/产生新的 WebBrowser ,即 Chrome浏览器会话.

...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.

第一条日志消息:

Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.

使用,性质丰富.

is part of the startup log when using ChromeDriver and is informative in nature.


以下日志消息:


The following log message:

[1573451703.668][WARNING]: Timed out connecting to Chrome, retrying...

表示您使用的二进制版本之间存在某些不兼容性.

indicates there are some incompatibility between the version of the binaries you are using.

确保:

  • JDK 已升级到当前级别 JDK 8u222 .
  • 已升级到当前级别版本3.141.59 .
  • ChromeDriver 已更新为当前的 ChromeDriver v78.0 级别.
  • Chrome 已更新为当前的 Chrome版本78.0 级别. (根据 ChromeDriver v78.0发行说明)
  • 通过 IDE
  • 清理您的项目工作区重建您的项目,并且仅具有必需的依赖项.
  • (仅仅WindowsOS )使用 CCleaner 工具,可消除执行 Test Suite 之前和之后的所有操作系统琐事.
  • (仅仅LinuxOS )在执行 Test Suite 之前和之后释放并释放Ubuntu/Linux Mint 中未使用/缓存的内存.
  • >
  • 如果您的基本 Web客户端版本太旧,则将其卸载并安装最新版本的 Web客户端 GA.
  • 进行系统重启.
  • 非root用户用户的身份执行@Test.
  • 始终在tearDown(){}方法中调用driver.quit()以关闭&优雅地销毁 WebDriver Web Client 实例.
  • JDK is upgraded to current levels JDK 8u222.
  • Selenium is upgraded to current levels Version 3.141.59.
  • ChromeDriver is updated to current ChromeDriver v78.0 level.
  • Chrome is updated to current Chrome Version 78.0 level. (as per ChromeDriver v78.0 release notes)
  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
  • (WindowsOS only) Use CCleaner tool to wipe off all the OS chores before and after the execution of your Test Suite.
  • (LinuxOS only) Free Up and Release the Unused/Cached Memory in Ubuntu/Linux Mint before and after the execution of your Test Suite.
  • If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
  • Take a System Reboot.
  • Execute your @Test as non-root user.
  • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.

这篇关于如何修复[1573451709.039] [警告]:使用chrome版本78和chrome驱动程序版本78.0.3904.70时,连接到Chrome超时,正在重试...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 04:36