robotframework / robotframework/SeleniumLibrary

SessionNotCreatedException using Selenoid and chrome version 56.0

Open
#1,779 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the Robot Framework keyword “Open Specific Browser Version,” focusing on its Open Browser call, desired_capabilities, and the Chrome 56.0 error. Compare the capabilities sent for Chrome 103.0 with the Selenoid-UI session details; done means determining the compatible configuration or documenting that limitation for SeleniumLibrary 6.0.0.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.