• <small id='cZXsg'></small><noframes id='cZXsg'>

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

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

        运行 selenium 远程驱动程序时出现带有 NativeConstructorAccessorImpl.newIns

        Error SessionNotCreatedException with NativeConstructorAccessorImpl.newInstance0 while running selenium remotedriver(运行 selenium 远程驱动程序时出现带有 NativeConstructorAccessorImpl.newInstance0 的错误 SessionNotCreatedException) - IT屋-
        <tfoot id='3BTLO'></tfoot>

          • <small id='3BTLO'></small><noframes id='3BTLO'>

              <legend id='3BTLO'><style id='3BTLO'><dir id='3BTLO'><q id='3BTLO'></q></dir></style></legend>

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

                  <bdo id='3BTLO'></bdo><ul id='3BTLO'></ul>
                • 本文介绍了运行 selenium 远程驱动程序时出现带有 NativeConstructorAccessorImpl.newInstance0 的错误 SessionNotCreatedException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在运行以下但收到错误

                  I am running the following but getting the error

                  public class base
                  {
                      public static WebDriver driver;
                  
                      public static void main(String[]  args) throws MalformedURLException, InterruptedException
                      {
                          System.setProperty("webdriver.chrome.driver", "C:\code\lib\browser drivers\chromedriver.exe");
                  
                          String URL = "http://www.google.com";
                          String Node = "http://localhost:4444/wd/hub";
                          DesiredCapabilities cap = DesiredCapabilities.chrome();
                          cap = DesiredCapabilities.chrome();
                          cap.setPlatform(org.openqa.selenium.Platform.WINDOWS);
                  
                  
                          driver = new RemoteWebDriver(new URL(Node), cap);
                  
                          driver.navigate().to(URL);
                          Thread.sleep(5000);
                          driver.quit();
                      }       
                  }
                  

                  错误显示如下:

                  Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService
                  Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
                  System info: host: 'RAJESHW10', ip: '169.254.3.253', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_91'
                  Driver info: driver.version: unknown
                  Command duration or timeout: 316 milliseconds
                      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                  

                  有人可以帮忙吗

                  推荐答案

                  请执行以下操作并重试.

                  Please do the following and retry.

                  确保将路径 C:\code\lib\browser drivers\chromedriver.exe 添加到计算机上的 %PATH% 变量中您正在运行的节点.这将确保 selenium uber jar 可以找到 chromedriver 二进制文件的位置.

                  Ensure that the path C:\code\lib\browser drivers\chromedriver.exe is added to your %PATH% variable on the machine in which you are running the node. This would ensure that the selenium uber jar can find the location of the chromedriver binary.

                  System.setProperty("webdriver.chrome.driver", "C:codelibrowser driverschromedriver.exe");

                  这个机制应该只在你做的时候使用

                  This mechanism should be only used when you are doing

                  ChromeDriver 驱动程序 = ChromeDriver()

                  由于您使用的是 selenium 网格,因此您在这里处理的是多个 JVM.

                  Since you are working with a selenium grid, you are dealing with multiple JVMs here.

                  System.setProperty() 只会影响当前的 JVM(在这种情况下是您的测试),但实际的浏览器会在不同的 JVM(运行 selenium 的那个节点).

                  System.setProperty() will affect only the current JVM (which in this case is your tests), but the actual browser gets spun off in a different JVM (the one that is running the selenium node).

                  这篇关于运行 selenium 远程驱动程序时出现带有 NativeConstructorAccessorImpl.newInstance0 的错误 SessionNotCreatedException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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如何按不区分大小写进行搜索)

                      • <small id='IlwsJ'></small><noframes id='IlwsJ'>

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

                          • <tfoot id='IlwsJ'></tfoot>

                              <tbody id='IlwsJ'></tbody>