在 Mac 上使用 Chrome 驱动程序运行 Selenium Test Java 时出现“SessionNotCreatedException:无法启动新会话”

问题描述 投票:0回答:0

我进入控制台:

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

当我在 macbook 上使用 Chrome 驱动程序运行 Selenium Junit 测试时。我检查了这是我在 chrome 浏览器版本中使用的正确驱动程序。我从操作系统收到一条安全警告,说

chromedriver.exe
的编辑器未知。我在设置中授予了访问权限,但没有进行任何更改。

我尝试了所有可能的方法来导入 chrome 驱动程序,在具有绝对路径的本地机器上,使用

WebDriverManager
等。 不是版本问题,我用的
Chrome v110
.
没有任何效果,我更改了 MacBook 的安全设置以使驱动程序正常工作,但每次启动 JUnit 测试时都没有更改任何内容。

java google-chrome security selenium-webdriver junit
© www.soinside.com 2019 - 2024. All rights reserved.