哪个chromedriver版本支持电子应用程序? [英] which chromedriver version supports electron app?

查看:67
本文介绍了哪个chromedriver版本支持电子应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用以下代码运行电子应用程序:

  @Test公共无效testElectron(){System.setProperty("webdriver.chrome.driver",chromeDriverPath);ChromeOptions chromeOptions =新的ChromeOptions();chromeOptions.setBinary(this.electronPath);WebDriver驱动程序=新的C​​hromeDriver(chromeOptions);} 

但是出现以下错误:

 在端口37592上启动ChromeDriver 87.0.4280.88(89e2380a3e36c3464b5dd1302349b1382549290d-refs/branch-heads/4280 @ {#1761})仅允许本地连接.请参阅https://chromedriver.chromium.org/security-considerations,以获取有关保护ChromeDriver安全的建议.ChromeDriver已成功启动.org.openqa.selenium.SessionNotCreatedException:未创建会话:此版本的ChromeDriver仅支持Chrome版本87当前浏览器版本为80.0.3987.165,二进制路径为src \ main \ resources \ electron \ electronApp.exe 

是否有适用于电子应用程序(适用于硒java)的特定chromedriver?

解决方案

此错误消息...

 当前浏览器版本为80.0.3987.165,二进制路径为src \ main \ resources \ electron \ electronApp.exe 

...表示 Chrome 浏览器版本为 80.0 .


解决方案

因此,作为解决方案,您必须下载匹配的 ChromeDriver ChromeDriver v80.0.3987.106 存储库中.>

I try to run electron app using the following code:

@Test
public void testElectron() {
    System.setProperty("webdriver.chrome.driver", chromeDriverPath);
    ChromeOptions chromeOptions = new ChromeOptions();
    chromeOptions.setBinary(this.electronPath);
    WebDriver driver = new ChromeDriver(chromeOptions);
}

But I get the following error:

Starting ChromeDriver 87.0.4280.88 (89e2380a3e36c3464b5dd1302349b1382549290d-refs/branch-heads/4280@{#1761}) on port 37592
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
org.openqa.selenium.SessionNotCreatedException: session not created: This 
version of ChromeDriver only supports Chrome version 87
Current browser version is 80.0.3987.165 with binary path src\main\resources\electron\electronApp.exe

Is there a specific chromedriver the is suitable for electron app (for selenium java)?

解决方案

This error message...

Current browser version is 80.0.3987.165 with binary path src\main\resources\electron\electronApp.exe

...implies that the Chrome browser version is 80.0.


Solution

So as a solution you have to download the matching ChromeDriver from ChromeDriver v80.0.3987.106 repository.

这篇关于哪个chromedriver版本支持电子应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆