<legend id='C3aoy'><style id='C3aoy'><dir id='C3aoy'><q id='C3aoy'></q></dir></style></legend>

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

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

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

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

        SessionNotCreatedException:消息:无法创建新服务:通过

        时间:2023-10-08

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

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

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

                  本文介绍了SessionNotCreatedException:消息:无法创建新服务:通过 Python 使用 ChromeDriver 和 SeleniumGrid 的 ChromeDriverService的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  您好,任何人都知道发生了什么或如何调试错误,如下所示.我所做的步骤是使用设置集线器命令并将节点注册到集线器.在命令注册节点之后.我可以看到日志为

                  Hi anyone know what is going on or how I can debug the error as following. the step I did is using setup hub command and register node to hub. after the command register node. I can see the log as

                  The node is registered to the hub and ready to use 
                  

                  但是,当我运行测试脚本时,我的错误打印为:

                  However when I run the test script I have error print up as:

                  selenium.common.exceptions.SessionNotCreatedException: Message: Unable to create new service: ChromeDriverService
                  

                  二进制版本:

                  • selenium 独立版本:3.14.0
                  • selenium 远程驱动版本:selenium==3.14.1
                  • python 版本:3.6.4

                  脚本:

                  import os
                  from selenium import webdriver
                  from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
                  
                  driver = webdriver.Remote(command_executor='http://localhost:4444/wd/hub',
                                            desired_capabilities=DesiredCapabilities.CHROME)
                  

                  设置中心:

                  #java -jar /Users/admin/selenium-server-standalone-3.14.0.jar -host localhost -role hub
                  

                  注册节点:

                  #java -jar /Users/admin/selenium-server-standalone-3.14.0.jar -role node
                  

                  错误:

                  E       selenium.common.exceptions.SessionNotCreatedException: Message: Unable to create new service: ChromeDriverService
                  E       Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
                  E       Driver info: driver.version: unknown
                  E       Stacktrace:
                  E           at org.openqa.selenium.remote.server.ServicedSession$Factory.lambda$get$0 (ServicedSession.java:134)
                  E           at org.openqa.selenium.remote.server.ServicedSession$Factory.apply (ServicedSession.java:151)
                  E           at org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$12 (ActiveSessionFactory.java:177)
                  E           at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:193)
                  ...
                  E           at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)
                  E           at java.util.concurrent.FutureTask.run (FutureTask.java:266)
                  E           at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142)
                  E           at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)
                  E           at java.lang.Thread.run (Thread.java:745)
                  
                  ../lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py:242: SessionNotCreatedException
                  

                  推荐答案

                  这个错误信息...

                  selenium.common.exceptions.SessionNotCreatedException: Message: Unable to create new service: ChromeDriverService
                  

                  ...暗示 ChromeDriver 无法启动/生成新的 ChromeDriverService.

                  ...implies that the ChromeDriver was unable to initiate/spawn a new ChromeDriverService.

                  commandsincompatibility 在您使用的二进制文件版本之间存在几个问题,如下所示:

                  There are a couple of issues in the commands and incompatibility between the version of the binaries you are using as follows:

                  • 您的 JDK 版本1.8.0_91,非常古老.
                  • JDK 升级到最新级别 JDK 8u181.
                  • 要注册一个Selenium Grid Hub,您需要使用以下命令:

                  • Your JDK version is 1.8.0_91 which is pretty ancient.
                  • Upgrade JDK to recent levels JDK 8u181.
                  • To register a Selenium Grid Hub you need to use the following command:

                  >java -jar /Users/admin/selenium-server-standalone-3.14.0.jar -role hub
                  

                1. 要为ChromeDriverChrome注册一个Selenium Grid Node,你需要传递ChromeDriver的绝对路径 以及 Registration URIKeyValue 如下:

                2. To register a Selenium Grid Node for ChromeDriver and Chrome you need to pass the absolute path of the ChromeDriver along with the Key and Value of the Registration URI as follows:

                  >java -Dwebdriver.chrome.driver=/path/to/chromedriver.exe -jar /Users/admin/selenium-server-standalone-3.14.0.jar -role node -hub http://<IP_GRID_HUB>:4444/grid/register
                  

                3. 你的代码块在我看来不错.

                4. You code block looks good to me.

                  这篇关于SessionNotCreatedException:消息:无法创建新服务:通过 Python 使用 ChromeDriver 和 SeleniumGrid 的 ChromeDriverService的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                5. 上一篇:selenium.common.exceptions.WebDriverException:消息:未知错误 下一篇:如何通过 Selenium 和 Python 以无头模式启动 Chrome

                  相关文章

                  最新文章

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

                7. <small id='c0kLW'></small><noframes id='c0kLW'>

                  <tfoot id='c0kLW'></tfoot>