<bdo id='Flgm3'></bdo><ul id='Flgm3'></ul>

  1. <legend id='Flgm3'><style id='Flgm3'><dir id='Flgm3'><q id='Flgm3'></q></dir></style></legend>
  2. <small id='Flgm3'></small><noframes id='Flgm3'>

    1. <tfoot id='Flgm3'></tfoot>

    2. <i id='Flgm3'><tr id='Flgm3'><dt id='Flgm3'><q id='Flgm3'><span id='Flgm3'><b id='Flgm3'><form id='Flgm3'><ins id='Flgm3'></ins><ul id='Flgm3'></ul><sub id='Flgm3'></sub></form><legend id='Flgm3'></legend><bdo id='Flgm3'><pre id='Flgm3'><center id='Flgm3'></center></pre></bdo></b><th id='Flgm3'></th></span></q></dt></tr></i><div id='Flgm3'><tfoot id='Flgm3'></tfoot><dl id='Flgm3'><fieldset id='Flgm3'></fieldset></dl></div>

      Selenium Chromedriver 服务器超时,尽管可用

      Selenium Chromedriver server times out despite being available(Selenium Chromedriver 服务器超时,尽管可用)
      <tfoot id='nMOW3'></tfoot>
          <bdo id='nMOW3'></bdo><ul id='nMOW3'></ul>

          <i id='nMOW3'><tr id='nMOW3'><dt id='nMOW3'><q id='nMOW3'><span id='nMOW3'><b id='nMOW3'><form id='nMOW3'><ins id='nMOW3'></ins><ul id='nMOW3'></ul><sub id='nMOW3'></sub></form><legend id='nMOW3'></legend><bdo id='nMOW3'><pre id='nMOW3'><center id='nMOW3'></center></pre></bdo></b><th id='nMOW3'></th></span></q></dt></tr></i><div id='nMOW3'><tfoot id='nMOW3'></tfoot><dl id='nMOW3'><fieldset id='nMOW3'></fieldset></dl></div>

          <small id='nMOW3'></small><noframes id='nMOW3'>

              <tbody id='nMOW3'></tbody>
            <legend id='nMOW3'><style id='nMOW3'><dir id='nMOW3'><q id='nMOW3'></q></dir></style></legend>
                本文介绍了Selenium Chromedriver 服务器超时,尽管可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个 Java Selenium 项目,它不能在我的机器上运行,但可以在具有相同操作系统版本 (OSX 10.13.1)、Chrome 浏览器版本 (63.0.3239.84) 和 chromedriver 版本 (2.34) 的同事机器上运行).我收到消息:

                I have a Java Selenium project that will not run on my machine, but does run on coworkers' machines with the same OS version (OSX 10.13.1), Chrome browser version (63.0.3239.84), and chromedriver version (2.34). I get the message:

                Starting ChromeDriver 2.34.522932 (4140ab217e1ca1bec0c4b4d1b148f3361eb3a03e) on port 18633
                Only local connections are allowed.
                
                org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
                Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T18:33:54.468Z'
                System info: host: 'localhost', ip: 'fe80:0:0:0:1cc9:e0ab:f4e5:dd34%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.1', java.version: '1.8.0_20'
                Driver info: driver.version: ChromeDriver
                ...
                Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:18633/status] to be available after 20005 ms
                    at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:100)
                    at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:187)
                    ... 28 more
                Caused by: java.util.concurrent.TimeoutException
                    at java.util.concurrent.FutureTask.get(FutureTask.java:205)
                    at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:149)
                    at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:75)
                    ... 29 more
                

                但是,当我在浏览器中打开 http://localhost:18633/status 时,我得到了有效的响应:

                however when I open http://localhost:18633/status in my browser I get a valid response:

                {"sessionId":"","status":0,"value":{"build":{"version":"alpha"},"os":{"arch":"x86_64","name":"Mac OS X","version":"10.13.1"}}}
                

                我试过换掉 chromedriver 二进制文件,但我不确定还能做什么.我在 geckodriver 上遇到了类似的问题,但这可能是也可能不是同一个问题.我还尝试在我的系统上创建一个新用户并从该帐户运行它,以考虑用户设置 - 不走运.

                I've tried swapping out chromedriver binaries, but I'm not really sure what else to do. I get similar issues with geckodriver, but that may or may not be the same issue. I have also tried creating a new user on my system and running it from that account, to account for user settings - No luck.

                我在这里缺少什么?哪些信息有助于调试此问题?

                What am I missing here? What info would be helpful to debug this problem?

                推荐答案

                错误说明了一切:

                org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
                

                明确指出WebDriver 实例未启动.因此,Driver info 保留为 blank 为:

                Clearly indicates the WebDriver instance didn't get initiated. Hence Driver info is left blank as :

                Driver info: driver.version: ChromeDriver
                

                哪个反过来产生错误:

                org.openqa.selenium.net.UrlChecker$TimeoutException
                

                java.util.concurrent.TimeoutException
                

                <小时>

                如果没有任何代码块的可见性,很难猜测实际原因,但通常我们可以通过下载 repository 并在初始化 WebDriver 实例时传递 ChromeDriver 的绝对路径,如下所示:


                It would be tough to guess the actual reason without any visibility of your code block but in general we can solve this by downloading the ChromeDriver binary from this repository and passing the absolute path of the ChromeDriver while initializing the WebDriver instance as follows :

                System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");
                driver = new ChromeDriver();
                

                <小时>

                要点:

                • 始终使用 Selenium ClientChromeDriver 二进制文件的最新版本.
                • 始终为浏览器启用自动更新.
                • 始终保持 JDK 版本更新(当前版本为 JDK 8u241)

                • Key Points :

                  • Always use the latest version of the Selenium Client and ChromeDriver binaries.
                  • Always keep the automatic updates for the browser enabled.
                  • Always keep the JDK version updated (the current version being JDK 8u241)
                  • 这篇关于Selenium Chromedriver 服务器超时,尽管可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                    本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Lucene Porter Stemmer not public(Lucene Porter Stemmer 未公开)
                How to index pdf, ppt, xl files in lucene (java based or python or php any of these is fine)?(如何在 lucene 中索引 pdf、ppt、xl 文件(基于 java 或 python 或 php 中的任何一个都可以)?)
                KeywordAnalyzer and LowerCaseFilter/LowerCaseTokenizer(KeywordAnalyzer 和 LowerCaseFilter/LowerCaseTokenizer)
                How to search between dates (Hibernate Search)?(如何在日期之间搜索(休眠搜索)?)
                How to get positions from a document term vector in Lucene?(如何从 Lucene 中的文档术语向量中获取位置?)
                Java Lucene 4.5 how to search by case insensitive(Java Lucene 4.5如何按不区分大小写进行搜索)
                  • <legend id='X2aDl'><style id='X2aDl'><dir id='X2aDl'><q id='X2aDl'></q></dir></style></legend>

                      <i id='X2aDl'><tr id='X2aDl'><dt id='X2aDl'><q id='X2aDl'><span id='X2aDl'><b id='X2aDl'><form id='X2aDl'><ins id='X2aDl'></ins><ul id='X2aDl'></ul><sub id='X2aDl'></sub></form><legend id='X2aDl'></legend><bdo id='X2aDl'><pre id='X2aDl'><center id='X2aDl'></center></pre></bdo></b><th id='X2aDl'></th></span></q></dt></tr></i><div id='X2aDl'><tfoot id='X2aDl'></tfoot><dl id='X2aDl'><fieldset id='X2aDl'></fieldset></dl></div>
                      <tfoot id='X2aDl'></tfoot>

                      • <bdo id='X2aDl'></bdo><ul id='X2aDl'></ul>
                          <tbody id='X2aDl'></tbody>

                          <small id='X2aDl'></small><noframes id='X2aDl'>