【问题标题】:Zalenium launches chrome browser but doesn't kicks off testZalenium 推出 chrome 浏览器,但未启动测试
【发布时间】:2019-07-22 03:35:06
【问题描述】:

我正在尝试在 zalenium 上运行我的测试脚本,尽管浏览器已启动(在 vnc 中注意到)但测试并未在容器上运行。我在日志中注意到以下错误。

硒版:

 <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-server</artifactId>
                <version>3.0.1</version>
            </dependency>

            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-java</artifactId>
                <version>3.0.1</version>
            </dependency>

硒日志:

org.openqa.selenium.SessionNotCreatedException:无法创建新的 远程会话。期望的能力 = 能力 [{name=TestCaseName, browserName=chrome, platform=LINUX}],必填 能力 = 能力 [{}] 构建信息:版本:'3.0.1',修订:'1969d75',时间:'2016-10-18 09:49:13 -0700'

Docker 日志:

警告 os.jetty9.server.HttpChannel - /wd/hub/session java.io.IOException:org.openqa.grid.common.exception.GridException: 在请求中未找到任何功能:{“capabilities”: {“所需能力”: {"name":"TestcaseName","browserName":"chrome","platform":"LINUX"},"requiredCapabilities": {}}}

【问题讨论】:

  • 您是否在创建连接时传递了所有必需的功能?
  • @ManiDeepak 版本:'3.0.1' ?为什么不是 v3.141.59?
  • @DebanjanB 升级到 v3.141.59 就像一个魅力,我们的基础框架设计用于 v3.01,现在我将我的 pom 更新到 3.141.59。你能告诉我为什么 3.141.59 工作而不是低于版本。非常感谢您的快速回复和解决问题

标签: selenium google-chrome selenium-chromedriver selenium-grid zalenium


【解决方案1】:

此错误消息...

org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session.

...暗示 ChromeDriver 无法启动/生成新的 WebBrowserChrome 浏览器 会话。

从您的 maven 依赖项 和您正在使用的日志消息中可以明显看出 Selenium v​​3.0.1


事实上,Selenium 日志Docker 日志没有具体的指示来确定问题的任何根本原因,而不是SessionNotCreatedException。在 SessionNotCreatedException 的情况下,主要嫌疑人始终是您使用的二进制文件版本之间的不兼容,并且始终建议更新以下二进制文件:

  • Selenium JAR (v3.141.59)
  • ChromeDriver (v75.0)
  • Chrome 浏览器 (v75.0)

【讨论】:

    猜你喜欢
    • 2022-11-17
    • 1970-01-01
    • 2011-11-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-20
    相关资源
    最近更新 更多