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

    • <bdo id='iLwC8'></bdo><ul id='iLwC8'></ul>
    <legend id='iLwC8'><style id='iLwC8'><dir id='iLwC8'><q id='iLwC8'></q></dir></style></legend>
      <tfoot id='iLwC8'></tfoot>

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

      1. 端口无效.退出... org.openqa.selenium.os.OsProcess checkForError 同时

        Invalid port. Exiting... org.openqa.selenium.os.OsProcess checkForError while launching chrome using selenium(端口无效.退出... org.openqa.selenium.os.OsProcess checkForError 同时使用 selenium 启动 chrome)

          <bdo id='nmBiK'></bdo><ul id='nmBiK'></ul>
              <tbody id='nmBiK'></tbody>
          • <tfoot id='nmBiK'></tfoot>

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

              1. <legend id='nmBiK'><style id='nmBiK'><dir id='nmBiK'><q id='nmBiK'></q></dir></style></legend>

                  <i id='nmBiK'><tr id='nmBiK'><dt id='nmBiK'><q id='nmBiK'><span id='nmBiK'><b id='nmBiK'><form id='nmBiK'><ins id='nmBiK'></ins><ul id='nmBiK'></ul><sub id='nmBiK'></sub></form><legend id='nmBiK'></legend><bdo id='nmBiK'><pre id='nmBiK'><center id='nmBiK'></center></pre></bdo></b><th id='nmBiK'></th></span></q></dt></tr></i><div id='nmBiK'><tfoot id='nmBiK'></tfoot><dl id='nmBiK'><fieldset id='nmBiK'></fieldset></dl></div>
                  本文介绍了端口无效.退出... org.openqa.selenium.os.OsProcess checkForError 同时使用 selenium 启动 chrome的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 selenium 服务器独立 jar-3.11.0、最新的 ChromeDriver-2.36 和Chrome 版本 66.0.3359.139

                  I am using selenium server standalone jar- 3.11.0, latest ChromeDriver-2.36 and Chrome version 66.0.3359.139

                  我的代码

                  import org.openqa.selenium.WebDriver;
                  import org.openqa.selenium.chrome.ChromeDriver;
                  
                  public class WebDriverBasics {
                  
                      public static void main(String[] args) {
                  
                          System.setProperty("webdriver.chrome.driver", "C:\Users\surya\Downloads\Compressed\chromedriver_win32_2\chromedriver.exe");
                          WebDriver driver=new ChromeDriver();
                          driver.get("http://www.facebook.com");
                          driver.manage().window().maximize();
                      }
                  }
                  

                  但我无法启动 chrome.its 给出以下错误

                  But i am unable to launch chrome.its giving below error

                  Invalid port. Exiting...
                  ?? ??, ???? ??:??:?? ????????? org.openqa.selenium.os.OsProcess checkForError
                  SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
                  Exception in thread "main" org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
                  Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:33:15.31Z'
                  System info: host: 'DESKTOP-5GVJDVR', ip: '192.168.0.104', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_171'
                  Driver info: driver.version: ChromeDriver
                      at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:192)
                      at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:178)
                      at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:79)
                      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:545)
                      at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:209)
                      at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:132)
                      at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:181)
                      at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:168)
                      at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:123)
                      at WebDriverBasics.main(WebDriverBasics.java:12)
                  Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:????/status] to be available after ????? ms
                      at 
                  

                  推荐答案

                  这个错误信息...

                  Invalid port. Exiting...
                  ?? ??, ???? ??:??:?? ????????? org.openqa.selenium.os.OsProcess checkForError
                  SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
                  

                  ...暗示 OsProcess 无法绑定到您系统中分配的 空闲端口.

                  ...implies that the OsProcess is unable to bind to the assigned free port within your system.

                  根据讨论 获取无效端口错误.端口无效.正在退出...

                  端口无效.退出……"当分配给 chromedriver 的端口小于 0 或大于 65535 时发生.

                  解决方案

                  • 通过 CLI 执行 netstat 命令以查看您是否已达到可能打开的连接的限制或检查给定端口上是否有另一个应用程序正在运行.
                  • 检查您的防火墙设置,防火墙配置很可能会导致问题.
                  • ChromeDriver 升级到当前的 ChromeDriverv2.38 级别.
                  • Chrome 版本保持在 Chrome v66.x 级别.(根据 ChromeDriver v2.38 发行说明)
                  • 清理你的项目工作区通过你的IDE重建你的项目只需要依赖.
                  • 使用 CCleaner 工具清除之前和在您的测试套件执行之后.
                  • 如果您的基础 Web Client 版本太旧,请通过 卸载它Revo Uninstaller 并安装最新的 GA 和发布版本的 Web Client.
                  • 进行一次系统重启以释放端口.
                  • 执行你的 @Test.
                  • Solution

                    • Execute netstat command through CLI to see if you have reached limit of possible open connections or check if there is another application running on the given port.
                    • Check your firewall settings, there is a good chance that firewall configuration may be causing the issue.
                    • Upgrade ChromeDriver to current ChromeDriver v2.38 level.
                    • Keep Chrome version at Chrome v66.x levels. (as per ChromeDriver v2.38 release notes)
                    • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
                    • Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
                    • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
                    • Take a System Reboot to free up the ports.
                    • Execute your @Test.
                    • 注意:步骤 1、2、7 和 8 对于调试/解决您当前面临的问题至关重要.

                      Note : Steps 1, 2, 7 and 8 are vital to debug/solve the issue you are currently facing.

                      作为替代方案,您可以强制 WebDriver 变体,即 ChromeDriver 在特定端口上启动,例如65530如下:

                      As an alternative you can force the WebDriver variant i.e. ChromeDriver to start on a specific port e.g. 65530 as follows:

                      • 代码块:

                      • Code Block:

                      System.setProperty("webdriver.chrome.driver","C:\WebDrivers\chromedriver.exe");
                      WebDriver driver= new ChromeDriver(new ChromeDriverService.Builder().usingPort(65530).build());
                      driver.get("https://www.google.com/");
                      

                    • 控制台输出:

                    • Console Output:

                      Starting ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103@{#416}) on port 65530
                      Only local connections are allowed.
                      Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
                      ChromeDriver was started successfully.
                      Jul 20, 2020 7:36:17 PM org.openqa.selenium.remote.ProtocolHandshake createSession
                      INFO: Detected dialect: W3C
                      

                    • 您可以在以下位置找到一些相关的详细讨论:

                      You can find a couple of relevant detailed discussions in:

                      • 端口无效.Exiting..Exception in thread main" org.openqa.selenium.WebDriverException:驱动服务器进程过早死亡 ChromeDriver Selenium
                      • org.openqa.selenium.os.OsProcess checkForError 和 org.apache.commons.exec.ExecuteException:进程因 Selenium ChromeDriver 错误而退出
                      • "OsProcess checkForError : CreateProcess error=193, %1 is not an valid Win32 application",同时通过 Java 和 Selenium 启动 Internet Explorer

                      这篇关于端口无效.退出... org.openqa.selenium.os.OsProcess checkForError 同时使用 selenium 启动 chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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='J5IJh'><style id='J5IJh'><dir id='J5IJh'><q id='J5IJh'></q></dir></style></legend>

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

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