which chromedriver version supports electron app?

喜夏-厌秋 提交于 2021-01-28 19:56:44

问题


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)?


回答1:


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.



来源:https://stackoverflow.com/questions/65400461/which-chromedriver-version-supports-electron-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!