Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

SessionNotCreatedException using Selenoid and chrome version 56.0

未关闭
#1,779 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
python
领域
testing-qa

调研方向

使用 Robot Framework 关键字“Open Specific Browser Version”重现该失败,重点关注其 Open Browser 调用、desired_capabilities 以及 Chrome 56.0 错误。将为 Chrome 103.0 发送的 capabilities 与 Selenoid-UI 的会话详细信息进行比较;完成标准是确定兼容的配置,或记录 SeleniumLibrary 6.0.0 的这一限制。

由索引模型根据 Issue 内容生成。

描述

Issue

I would need some help getting the RF-SeleniumLibrary work with Selenoid. I am testing a website with two versions of Chrome: v103 & v56. The keyword works for newer versions of Chrome, but fails for older ones (56.0 for example. I think it has something to do with the parameters I am setting, which are not compatible with such a low version, as I am able to start chrome w/ version 56.0 manually in the Selenoid-UI.

This is the keyword I use to open the website on a remote browser using Selenoid:

Steps to reproduce the issue

Keyword:

Open Specific Browser Version
    [Arguments]    ${url}    ${browser}    ${version}
    ${caps}=    Create Dictionary    version=${version}
    Wait Until Keyword Succeeds
    ...    30 seconds
    ...    5 s
    ...    Open Browser
    ...    url=${url}
    ...    browser=${browser}
    ...    remote_url=${selenoid_server}
    ...    desired_capabilities=${caps}

Call it:

Open Specific Browser Version    https://google.come    chrome    103.0

Error messages and additional information

This works with Chrome 103.0, but results in an error with Chrome 56.0:

| FAIL |
Keyword 'frontend.Open Browser To Dashboard' failed after retrying for 30 seconds. The last error was: Keyword 'Open Browser' failed after retrying for 30 seconds. The last error was: SessionNotCreatedException: Message: session not created exception: Missing or invalid capabilities
  (Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 5.18.11-100.fc35.x86_64 x86_64)

If I change the desired_capabilities parameter to options, the Chrome v103.0 also does not work. Both versions throw the following error:

Keyword 'frontend.Open Browser To Dashboard' failed after retrying for 30 seconds. The last error was: Keyword 'Open Browser' failed after retrying for 30 seconds. The last error was: AttributeError: to_capabilities

However, using selenoid-ui, it's possible to start a Chrome v56 instance manually, so I guess I have some wrong parameters set.

Selenoid-UI console log:

Initialize...

Connecting to ws://127.0.0.1:8080/ws/logs/742684cc34796c87fd0145c735281faa...
Connected!

 --- x11vnc loop: 1 ---

Starting ChromeDriver 2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5) on port 4444
All remote connections are allowed. Use a whitelist instead!
[0.036][INFO]: COMMAND InitSession {
   "capabilities": {
      "alwaysMatch": {
         "browserName": "chrome",
         "browserVersion": "56.0"
      },
      "firstMatch": [ {

      } ]
   },
   "desiredCapabilities": {
      "browserName": "chrome",
      "enableVNC": true,
      "labels": {
         "manual": "true"
      },
      "name": "Manual session",
      "sessionTimeout": "60m",
      "version": "56.0"
   }
}

Can someone maybe help me out? :) Thanks & BR

Environment

Browser: Name and version (Usually available from the about dialogue.)
Browser driver: Name and version
Operating System: Name and version (Linux, Ubuntu 18.04)
Libraries

  • Robot Framework: 5.0.1
  • SeleniumLibrary: 6.0.0
  • Interpreter: Python 3.10
主要语言
Python
星标
1.5k
派生
787
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

robotframework/SeleniumLibrary 的其他 Issue

查看 robotframework/SeleniumLibrary 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。