<bdo id='KCQQR'></bdo><ul id='KCQQR'></ul>
  • <tfoot id='KCQQR'></tfoot>

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

    1. <small id='KCQQR'></small><noframes id='KCQQR'>

        <i id='KCQQR'><tr id='KCQQR'><dt id='KCQQR'><q id='KCQQR'><span id='KCQQR'><b id='KCQQR'><form id='KCQQR'><ins id='KCQQR'></ins><ul id='KCQQR'></ul><sub id='KCQQR'></sub></form><legend id='KCQQR'></legend><bdo id='KCQQR'><pre id='KCQQR'><center id='KCQQR'></center></pre></bdo></b><th id='KCQQR'></th></span></q></dt></tr></i><div id='KCQQR'><tfoot id='KCQQR'></tfoot><dl id='KCQQR'><fieldset id='KCQQR'></fieldset></dl></div>
      1. org.openqa.selenium.NoSuchSessionException:在使用 ChromeDriver

        时间:2023-06-27

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

          <tfoot id='v7cqV'></tfoot>

              <tbody id='v7cqV'></tbody>
              <bdo id='v7cqV'></bdo><ul id='v7cqV'></ul>
                  <legend id='v7cqV'><style id='v7cqV'><dir id='v7cqV'><q id='v7cqV'></q></dir></style></legend>

                  <i id='v7cqV'><tr id='v7cqV'><dt id='v7cqV'><q id='v7cqV'><span id='v7cqV'><b id='v7cqV'><form id='v7cqV'><ins id='v7cqV'></ins><ul id='v7cqV'></ul><sub id='v7cqV'></sub></form><legend id='v7cqV'></legend><bdo id='v7cqV'><pre id='v7cqV'><center id='v7cqV'></center></pre></bdo></b><th id='v7cqV'></th></span></q></dt></tr></i><div id='v7cqV'><tfoot id='v7cqV'></tfoot><dl id='v7cqV'><fieldset id='v7cqV'></fieldset></dl></div>
                  本文介绍了org.openqa.selenium.NoSuchSessionException:在使用 ChromeDriver Chrome 和 Java 的 Selenium 自动化测试中没有此类会话错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在我的管道中运行 selenium 时得到没有这样的会话异常".我发现许多与之相关的解决方案,但没有一个对我有用.有什么帮助或想法吗?异常跟踪:

                  Getting "No such session exception" while running selenium in my pipeline. I find many solutions related it but none worked for me. Any assistance or idea? Exception trace:

                  org.openqa.selenium.NoSuchSessionException: no such session
                    (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 3.10.0-957.21.3.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
                  Command duration or timeout: 0 milliseconds
                  Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:25:02.294Z'
                  System info: host: 'chaos', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-957.21.3.el7.x86_64', java.version: '1.8.0_121'
                  Driver info: org.openqa.selenium.chrome.ChromeDriver
                  Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.38.552522 (437e6fbedfa876..., userDataDir: /tmp/.org.chromium.Chromium...}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 75.0.3770.100, webStorageEnabled: true}
                  Session ID: e25db38f6fb8cdaac6d4a699504c608f
                      at sun.reflect.GeneratedConstructorAccessor129.newInstance(Unknown Source)
                      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
                      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.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
                      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
                      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
                  

                  我已签入代码;没有使用 driver.close() 或 driver.quit().测试有时会成功运行,有时会失败.

                  I have checked in code; there is no driver.close() or driver.quit() is used.Tests are running successfully sometime and sometimes are failing.

                  谁能帮我解决这个问题?

                  Can any one help me for this issue?

                  推荐答案

                  这个错误信息...

                  org.openqa.selenium.NoSuchSessionException: no such session
                    (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 3.10.0-957.21.3.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
                  Command duration or timeout: 0 milliseconds
                  Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:25:02.294Z'
                  System info: host: 'chaos', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-957.21.3.el7.x86_64', java.version: '1.8.0_121'
                  Driver info: org.openqa.selenium.chrome.ChromeDriver
                  

                  ...暗示 ChromeDriver 无法启动/生成新的浏览上下文,即 Chrome 浏览器 会话.

                  ...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.

                  您的主要问题是您使用的二进制文件版本之间的不兼容性,如下所示:

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

                  • 您正在使用 chromedriver=2.38
                  • chromedriver=2.38 的发行说明明确提及以下内容:

                  支持 Chrome v65-67

                  • 大概你正在使用 chrome=79.0
                  • ChromeDriver v79.0的发行说明/a> 明确提及以下内容:
                    • Presumably you are using chrome=79.0
                    • Release Notes of ChromeDriver v79.0 clearly mentions the following :
                    • 支持Chrome 79版

                      • 您的 Selenium Client 版本是 2018-02-07T22:25:02.294Z3.9.1,几乎是 2 岁.
                      • 您的 JDK 版本1.8.0_121,非常古老.
                        • Your Selenium Client version is 3.9.1 of 2018-02-07T22:25:02.294Z which is almost 2 years older.
                        • Your JDK version is 1.8.0_121 which is pretty ancient.
                        • 所以 JDK v8u121Selenium Client v3.9.1ChromeDriver v2.38Chrome 之间存在明显的不匹配浏览器 v79.0

                          确保:

                          • JDK 升级到当前级别 JDK 8u232.
                          • Selenium 已升级到当前级别版本 3.141.59.
                          • ChromeDriver 已更新为当前 ChromeDriver v79.0.3945.36 级别.
                          • Chrome 已更新至当前 Chrome 版本 79.0 级别.(根据 ChromeDriver v79.0 发行说明)
                          • 清理你的项目工作区通过你的IDE重建你的项目只需要依赖.
                          • 如果您的基础 Web Client 版本太旧,请通过 卸载它Revo Uninstaller 并安装最新的 GA 和发布版本的 Web Client.
                          • 进行一次系统重启.
                          • 非 root 用户身份执行您的 @Test.
                          • JDK is upgraded to current levels JDK 8u232.
                          • Selenium is upgraded to current levels Version 3.141.59.
                          • ChromeDriver is updated to current ChromeDriver v79.0.3945.36 level.
                          • Chrome is updated to current Chrome Version 79.0 level. (as per ChromeDriver v79.0 release notes)
                          • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
                          • 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 as non-root user.

                          这篇关于org.openqa.selenium.NoSuchSessionException:在使用 ChromeDriver Chrome 和 Java 的 Selenium 自动化测试中没有此类会话错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:更新到 ChromeDriver 2.46 后 Chrome 版本必须介于 71 和 75 之间的错误 下一篇:禁用 Chrome 通知 (Selenium)

                  相关文章

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

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

                    1. <small id='OSM6V'></small><noframes id='OSM6V'>