久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

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

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

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

        org.openqa.selenium.WebDriverException:轉發新會話時出錯

        org.openqa.selenium.WebDriverException: Error forwarding the new session cannot find : Capabilities(org.openqa.selenium.WebDriverException:轉發新會話時出錯,找不到:功能)

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

                <i id='plX2r'><tr id='plX2r'><dt id='plX2r'><q id='plX2r'><span id='plX2r'><b id='plX2r'><form id='plX2r'><ins id='plX2r'></ins><ul id='plX2r'></ul><sub id='plX2r'></sub></form><legend id='plX2r'></legend><bdo id='plX2r'><pre id='plX2r'><center id='plX2r'></center></pre></bdo></b><th id='plX2r'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='plX2r'><tfoot id='plX2r'></tfoot><dl id='plX2r'><fieldset id='plX2r'></fieldset></dl></div>
              1. <tfoot id='plX2r'></tfoot>
              2. <legend id='plX2r'><style id='plX2r'><dir id='plX2r'><q id='plX2r'></q></dir></style></legend>
                  <tbody id='plX2r'></tbody>

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

                1. 本文介紹了org.openqa.selenium.WebDriverException:轉發新會話時出錯,找不到:功能的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  集線器啟動命令:

                  java -jar selenium-server-standalone-3.11.0.jar -role hub
                  

                  節點啟動命令:

                  java -Dwebdriver.chrome.driver=/Users/alina/Selenium/chromedriver.exe  -jar selenium-server-standalone-3.11.0.jar -role webdriver -hub http://192.168.100.4:4444/grid/register/
                  

                  環境詳細信息(根據評論更新):Selenium 3.11.0、Chrome 66、ChromeDriver 2.38

                  Environment Details (updated from comments) : Selenium 3.11.0, Chrome 66, ChromeDriver 2.38

                  import java.net.MalformedURLException;
                  import java.net.URL;
                  import java.util.concurrent.TimeUnit;
                  
                  import org.openqa.selenium.By;
                  import org.openqa.selenium.Platform;
                  import org.openqa.selenium.WebDriver;
                  import org.openqa.selenium.remote.DesiredCapabilities;
                  import org.openqa.selenium.remote.RemoteWebDriver;
                  
                  public class TestGrid {
                   static WebDriver driver;
                   static String nodeUrl;
                  
                  public static void main(String[] args)
                  {
                  
                  try {
                  
                      nodeUrl = "http://192.168.100.4:4444/wd/hub";
                      DesiredCapabilities capabilities = DesiredCapabilities.chrome();
                      capabilities.setPlatform(Platform.SIERRA);
                      driver = new RemoteWebDriver(new URL(nodeUrl), capabilities);
                      driver.manage().deleteAllCookies();
                      driver.manage().window().maximize();
                      driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
                      driver.manage().timeouts().pageLoadTimeout(45, TimeUnit.SECONDS);
                      driver.get("http://www.amazon.com");
                      driver.findElement(By.linkText("Today's Deals")).click();
                  
                  
                  } catch (MalformedURLException e) {
                      e.printStackTrace();
                  }
                  
                  }
                  

                  當我嘗試運行它時,我得到了這個錯誤:

                  When I try to run it, I get this error:

                  Apr 24, 2018 4:14:34 PM org.openqa.selenium.remote.DesiredCapabilities chrome
                  INFO: Using `new ChromeOptions()` is preferred to    `DesiredCapabilities.chrome()`
                  Exception in thread "main" org.openqa.selenium.WebDriverException: Error forwarding the new session cannot find : Capabilities {browserName: chrome, platform: macOS 10.12, version: }
                  Command duration or timeout: 90 milliseconds
                  Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:33:08.638Z'
                  System info: host: 'Alinas-MacBook-Pro.local', ip: '2a02:2f0e:1a0:5d9:95f0:9fb4:dfea:28c7%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.4', java.version: '10.0.1'
                  Driver info: driver.version: RemoteWebDriver
                  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
                  at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                  at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
                  at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
                  at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
                  at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
                  at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
                  at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
                  at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
                  at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
                  at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
                  at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
                  at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
                  at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
                  at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
                  at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
                  at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
                  at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
                  at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
                  at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
                  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.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:145)
                  at grid.TestGrid.main(TestGrid.java:26)
                  Caused by: org.openqa.grid.common.exception.GridException: Error forwarding the new session cannot find : Capabilities {browserName: chrome, platform: macOS 10.12, version: }
                  at org.openqa.grid.web.servlet.handler.RequestHandler.process(RequestHandler.java:118)
                  at org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:86)
                  at org.openqa.grid.web.servlet.DriverServlet.doPost(DriverServlet.java:70)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
                  at org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:860)
                  at org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:535)
                  at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
                  at org.seleniumhq.jetty9.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
                  at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
                  at org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
                  at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
                  at org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:473)
                  at org.seleniumhq.jetty9.server.session.SessionHandler.doScope(SessionHandler.java:1564)
                  at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
                  at org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
                  at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                  at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                  at org.seleniumhq.jetty9.server.Server.handle(Server.java:530)
                  at org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:347)
                  at org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:256)
                  at org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
                  at org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:102)
                  at org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
                  at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
                  at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
                  at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
                  at org.seleniumhq.jetty9.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
                  at org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
                  at org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
                  at java.lang.Thread.run(Thread.java:844)
                  

                  有誰知道我做錯了什么?

                  Does anyone know what am I doing wrong?

                  推薦答案

                  這個錯誤信息...

                  Exception in thread "main" org.openqa.selenium.WebDriverException: Error forwarding the new session cannot find : Capabilities {browserName: chrome, platform: macOS 10.12, version: }
                  

                  ...暗示 ChromeDriver 無法啟動與 WebClient 的活動連接,即 Chrome 瀏覽器.

                  ...implies that the ChromeDriver wasn't able to initiate an active connection with the WebClient i.e Chrome browser.

                  您的主要問題是您使用的二進制文件之間的版本兼容性,如下所示:

                  Your main issue is the version compatibility between the binaries you are using as follows :

                  • 您正在使用 chromedriver=2.36
                  • chromedriver=2.36 的發行說明明確提及以下內容:

                  支持 Chrome v63-65

                  • 您正在使用 chrome=66.0
                  • ChromeDriver v2.38 明確提及以下內容:
                  • 支持 Chrome v65-67

                    所以 ChromeDriver 版本 (v2.36) 和 Chrome 瀏覽器 版本 (v66.0)

                    So there is a clear mismatch between the ChromeDriver version (v2.36) and the Chrome Browser version (v66.0)

                    • ChromeDriver 升級到當前的 ChromeDriverv2.38 級別.
                    • Chrome 版本保持在 Chrome v66.x 級別.(根據 ChromeDriver v2.38 發行說明)
                    • 清理你的項目工作區通過你的IDE重建你的項目只需要依賴.
                    • 使用 CCleaner 工具清除之前和在您的測試套件執行之后.
                    • 如果您的基礎 Web Client 版本太舊,請通過 卸載它Revo Uninstaller 并安裝最新的 GA 和發布版本的 Web Client.
                    • 進行一次系統重啟.
                    • 執行你的 @Test.
                    • 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.
                    • Execute your @Test.

                    根據您在使用 Selenium 3.x 時的問題更新,您需要將關鍵字 webdriver 替換為 node 并刪除擴展名(WebDriver 變體的 .exe) 如下:

                    As per your question update while working with Selenium 3.x you need to replace the keyword webdriver with node and remove the extension (.exe) of the WebDriver variant as follows :

                    • Mac OS X:

                    java -Dwebdriver.chrome.driver=/Users/alina/Selenium/chromedriver -jar selenium-server-standalone-3.11.0.jar -role node -hub http://192.168.100.4:4444/grid/register/
                    

                    由于您仍然面臨同樣的錯誤,讓我們解決錯誤:

                    As you are still facing the same error let us address the error :

                    Using `new ChromeOptions()` is preferred to    `DesiredCapabilities.chrome()`
                    

                    根據錯誤消息,您需要使用 merge() 方法來自 MutableCapabilities 類合并DesiredCapabilities 類型的對象轉換為 ChromeOptions 類型的對象,并通過傳遞 ChromeOptions 對象來啟動 RemoteWebDriverWebClient 實例如下:

                    As per the error message you need to use the merge() method from MutableCapabilities Class to merge the DesiredCapabilities type of object into ChromeOptions type object and initiate the RemoteWebDriver and WebClient instance by passing the ChromeOptions object as follows :

                    System.setProperty("webdriver.chrome.driver", "/Users/username/chromedriver");
                    nodeUrl = "http://192.168.100.4:4444/wd/hub";
                    DesiredCapabilities capabilities = DesiredCapabilities.chrome();
                    capabilities.setPlatform(Platform.SIERRA);
                    ChromeOptions options = new ChromeOptions();
                    options.merge(capabilities);
                    driver = new RemoteWebDriver(new URL(nodeUrl), options);
                    driver.get("http://www.amazon.com");
                    

                    PS:作為參考,您可以查看 mutablecapabilities 中的討論強>標簽

                    PS : As a reference you can have a look at the discussions in mutablecapabilities tag

                    這篇關于org.openqa.selenium.WebDriverException:轉發新會話時出錯,找不到:功能的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                    【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                  How to convert Integer to int?(如何將整數轉換為整數?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)
                      <tbody id='W2HIP'></tbody>
                      <legend id='W2HIP'><style id='W2HIP'><dir id='W2HIP'><q id='W2HIP'></q></dir></style></legend>
                    1. <small id='W2HIP'></small><noframes id='W2HIP'>

                        <tfoot id='W2HIP'></tfoot>

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

                            <bdo id='W2HIP'></bdo><ul id='W2HIP'></ul>
                          • 主站蜘蛛池模板: 在线日韩| 日韩中文字幕在线播放 | 一区二区不卡视频 | 久久精品亚洲精品国产欧美 | 亚洲国产aⅴ精品一区二区 免费观看av | 四虎影院免费在线播放 | 免费看a| 精品国产一区二区三区性色av | 免费黄网站在线观看 | 国产精品欧美一区二区 | 色综合色综合色综合 | 91视频在线| 国产亚洲精品美女久久久久久久久久 | 五月综合久久 | 亚洲国产一区二区三区 | 国产日韩精品一区二区三区 | 成人亚洲精品 | 午夜二区 | 涩涩视频网站在线观看 | 成人在线免费网站 | 在线观看视频91 | 中文字幕欧美在线观看 | 欧美aaaaaaaaaa | av在线免费观看不卡 | 久久久久国产一区二区三区 | 欧美精品乱码久久久久久按摩 | 欧美精品一区二区三区在线 | 成人在线观看免费 | 一区视频在线 | 日韩免费在线观看视频 | 青青草一区二区 | 欧美性网| 成人精品久久久 | 在线观看视频一区二区三区 | 中文字幕国产精品 | 91xxx在线观看 | 在线小视频 | 国产精品美女久久久久久久网站 | 国产精品入口久久 | 全免费a级毛片免费看视频免 | 日韩看片|