在远程计算机中启动Electron Application后,无法启动或连接到chrome Execption

时间:2018-11-30 11:08:52

标签: java electron selenium-chromedriver

电子应用程序正在启动。然后几秒钟后,显示“无法启动或无法连接到Chrome”。例外

在Chrome驱动程序日志中:

[0.692][INFO]:      Launching chrome: "C:\Program Files\Path->To Electron 
Application" --disable-hang-monitor --disable-prompt-on-repost --dom-automation 
--full-memory-crash-report --no-default-browser-check --no-first-run --disable-
background-networking --disable-sync --disable-translate --disable-web-resources
 --safebrowsing-disable-auto-update --safebrowsing-disable-download-protection
 --disable-client-side-phishing-detection --disable-component-update --disable-
default-apps --enable-logging --log-level=1 --ignore-certificate-errors 
about:blank

[41.590][SEVERE]:   Failed to initialize connection

[51.634][WARNING]:  Chrome still running, terminating...

[51.635][INFO]:     Chrome shutdown

代码:

    System.setProperty("webdriver.chrome.driver","C:\\chromedriver\\chromedriver.exe");
    DesiredCapabilities capabilities = DesiredCapabilities.chrome();
    capabilities.setCapability("chrome.binary","\\path to electron application");
    capabilities.setVersion("10.49.31.81");
    options.merge(capabilities);
driver=new RemoteWebDriver(new URL("http://hubname/wd/hub:4444"), options);

0 个答案:

没有答案