相关疑难解决方法(0)

org.openqa.selenium.WebDriverException:未知错误:尝试启动Chrome浏览器时,DevToolsActivePort文件不存在

我正在尝试使用URL启动chrome,浏览器启动,之后它什么都不做.

我在1分钟后看到以下错误:

Unable to open browser with url: 'https://www.google.com' (Root cause: org.openqa.selenium.WebDriverException: unknown error: DevToolsActivePort file doesn't exist
  (Driver info: chromedriver=2.39.562718 (9a2698cba08cf5a471a29d30c8b3e12becabb0e9),platform=Windows NT 10.0.15063 x86_64) (WARNING: The server did not provide any stacktrace information)
Run Code Online (Sandbox Code Playgroud)

我的配置:

Chrome:66 ChromeBrowser:2.39.56

PS在Firefox中一切正常

selenium google-chrome webdriver selenium-chromedriver selenium-webdriver

120
推荐指数
16
解决办法
11万
查看次数

未知错误:在 ubuntu 上执行 Selenium UI 测试用例时,DevToolsActivePort 文件不存在错误

我也有一个带有 UI 的 ubuntu 服务器。你可以通过触发 mvn test 命令来执行测试用例。但问题是当我从另一台机器通过终端对机器执行 ssh 时,我收到以下错误 -

unknown error: DevToolsActivePort file doesn't exist
  (Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.4.0-121-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.04 seconds
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T18:33:54.468Z'
System info: host: 'ubuntu-test', ip: 'X.X.X.X', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-121-generic', java.version: '1.8.0_171'
Driver info: driver.version: ChromeDriver
Run Code Online (Sandbox Code Playgroud)

但是,如果我通过 remmina 远程控制机器,然后执行该机器终端的相同命令,则相同的命令会成功启动 chrome。

linux selenium google-chrome selenium-chromedriver selenium-webdriver

9
推荐指数
1
解决办法
3万
查看次数

无法使用Selenium和Java 11导入org.openqa.selenium.WebDriver

我是Selenium Webdriver和Java编程的新手。尝试解决eclipse 2018-12中的错误“无法解决导入org.openqa.selenium.WebDriver”,我使用Java 11,Selenium独立服务器3.141.59。请帮助。我无法导入jar文件,下面是屏幕截图

在此处输入图片说明

在此处输入图片说明

java selenium webdriver selenium-webdriver java-11

5
推荐指数
1
解决办法
1089
查看次数

org.openqa.selenium.WebDriverException:未知错误:DevToolsActivePort文件不存在

我尝试在作为节点连接到硒网格的远程PC上启动电子应用程序。以前它可以正常工作。但是现在我收到此错误“ DevToolActivePort文件不存在”

    System.out.println("launch application in windows PC");     
    capa  = new DesiredCapabilities();

    capa.setBrowserName("chrome");
    File file = new File("path\\to\\file\\.exe"); 
    URL server = new URL("http://ip_of_remote_pc:4444/wd/hub"); 

    ChromeOptions options = new ChromeOptions();
    options.setBinary(file);   //Sets the path to the Chrome executable
    capa.setCapability(ChromeOptions.CAPABILITY, options);
    driver2 = new RemoteWebDriver(server, capa); //launch the application
    System.out.println("launching application in remote PC");
    driver2.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);   
    System.out.println("Application launched"); 
Run Code Online (Sandbox Code Playgroud)

java selenium-chromedriver selenium-webdriver remotewebdriver

2
推荐指数
1
解决办法
3296
查看次数