<legend id='42d1A'><style id='42d1A'><dir id='42d1A'><q id='42d1A'></q></dir></style></legend>

      <bdo id='42d1A'></bdo><ul id='42d1A'></ul>
  • <tfoot id='42d1A'></tfoot>

      <small id='42d1A'></small><noframes id='42d1A'>

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

      1. RemoteWebDriver 抛出“org.openqa.selenium.SessionNotCreate

        时间:2023-09-28
        <legend id='tjyXS'><style id='tjyXS'><dir id='tjyXS'><q id='tjyXS'></q></dir></style></legend>
        • <i id='tjyXS'><tr id='tjyXS'><dt id='tjyXS'><q id='tjyXS'><span id='tjyXS'><b id='tjyXS'><form id='tjyXS'><ins id='tjyXS'></ins><ul id='tjyXS'></ul><sub id='tjyXS'></sub></form><legend id='tjyXS'></legend><bdo id='tjyXS'><pre id='tjyXS'><center id='tjyXS'></center></pre></bdo></b><th id='tjyXS'></th></span></q></dt></tr></i><div id='tjyXS'><tfoot id='tjyXS'></tfoot><dl id='tjyXS'><fieldset id='tjyXS'></fieldset></dl></div>

            <tfoot id='tjyXS'></tfoot>

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

            • <bdo id='tjyXS'></bdo><ul id='tjyXS'></ul>

                  <tbody id='tjyXS'></tbody>

                  本文介绍了RemoteWebDriver 抛出“org.openqa.selenium.SessionNotCreatedException:无法创建新的远程会话"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试从集线器到节点运行一个简单的代码,集线器和节点连接成功.

                  I'am trying to run a simple code from hub to node, hub and node connections are successful.

                  执行程序时出现异常

                  org.openqa.selenium.SessionNotCreatedException
                  

                  我提到的Chrome驱动路径是可以从节点机器访问的共享路径.

                  Chrome driver path which I have mentioned is a share path that can be accessible from the node machine.

                  • Chrome 版本:58.0.3029.110
                  • Chrome 驱动程序版本:2.9

                  Hub 和 Node 都是远程机器.

                  Both Hub and Node are remote machines.

                  下面是使用的代码:

                  public static void main(String[] args) throws MalformedURLException {
                  
                      WebDriver driver;
                      System.setProperty("webdriver.chrome.driver", "Q:\xxxxx\chromedriver.exe");
                      DesiredCapabilities dc = new DesiredCapabilities();
                      dc.setBrowserName("chrome");
                      dc.setPlatform(Platform.VISTA);
                      driver = new RemoteWebDriver(new URL("http://10.xx.xxx.xx:5566/wd/hub"), dc); //node url
                      driver.get("https://www.google.com");
                  
                  }
                  

                  以下是控制台消息:

                  Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{browserName=chrome, platform=VISTA}], required capabilities = Capabilities [{}]
                  Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
                  System info: host: 'A5DAFC-W7A-0012', ip: '10.xx.xxx.xx', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_131'
                  Driver info: driver.version: RemoteWebDriver
                      at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:91)
                      at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
                      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
                      at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
                      at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
                      at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:155)
                      at testcases.Grid.main(Grid.java:23)
                  

                  推荐答案

                  这是您问题的答案:

                  正如您使用以下命令启动 Selenium Grid Hub:

                  As you have used the following command to start the Selenium Grid Hub:

                   java -jar selenium-server-standalone-3.4.0.jar -role hub -port 4123
                  

                  要通过 chromedriver.exeGoogle Chrome 浏览器执行您的代码块,您可以考虑在端口 上启动 Selenium Grid Node>5566 通过这个命令:

                  To execute your code block through chromedriver.exe and Google Chrome Browser you can consider to start the Selenium Grid Node on port 5566 through this command:

                  java -Dwebdriver.chrome.driver=chromedriver.exe -jar selenium-server-standalone-3.4.0.jar -role node -hub http://localhost:4123/grid/register -port 5566
                  

                  通过 <IP_of_GridHub>:4123/grid/console 访问 Selenium Grid Hub 控制台以查看正在注册的节点.

                  Access the Selenium Grid Hub Console through <IP_of_GridHub>:4123/grid/console to see the Node being registered.

                  如果这能回答您的问题,请告诉我.

                  Let me know if this Answers your Question.

                  这篇关于RemoteWebDriver 抛出“org.openqa.selenium.SessionNotCreatedException:无法创建新的远程会话"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何隐藏警告“此类文件可能会损害您的计算机 下一篇:通过 Selenium Chromedriver 自动授予对 Chrome 48 中视频

                  相关文章

                  最新文章

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

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

                  2. <tfoot id='QjN3u'></tfoot>

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

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