SeleniumLibrary
SeleniumLibrary copied to clipboard
SessionNotCreatedException using Selenoid and chrome version 56.0
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