Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Using W3C protocol extensions Selenoid labels are missing in log files #384

Closed
martingrossmann opened this issue Sep 15, 2023 · 4 comments
Closed
Milestone

Comments

@martingrossmann
Copy link

With Selenium 4 I have to use the W3C protocol extensions for custom capabilties like for Selenoid.

Adding labels to selenoid:options they aren't visible any more in GGR logs:

Selenium 3 caps

{
  "browserName": "chrome",
  "enableVNC": true,
  "enableVideo": true,
  "goog:chromeOptions": {
    "args": [
      "--no-sandbox"
    ],
    "extensions": []
  },
  "labels": {
    "foo": "bar"
  },
  "version": "114",
  "videoName": "myvideoname.mp4"
}

results in GGR log
2023/09/15 14:32:36 [2731] [2.19s] [SESSION_CREATED] [test] [10.xx.xx.xx] [chrome-114 foo=bar] [192.168.xx.xx:5001] [129d5982f2c3221dd7faec52cff0e614] [1] [-]
--> OK

Selenium 4 caps

{
  "browserName": "chrome",
  "goog:chromeOptions": {
    "args": [
      "--no-sandbox"
    ],
    "extensions": []
  },
  "selenoid:options": {
    "enableVNC": true,
    "videoName": "myvideoname.mp4",
    "enableVideo": true,
    "labels": {
      "foo": "bar"
    }
  },
  "version": "114"
}

results in GGR log
2023/09/15 14:37:44 [3226] [2.01s] [SESSION_CREATED] [test] [10.xx.xx.xx] [chrome-114] [192.168.xx.xx:5002] [14bba25c7a8c47b56aeb2fb0bf1f3cae] [1] [-]
--> Not OK. Only browser was added, but no labels

@martingrossmann
Copy link
Author

@vania-pooh Hi, can you confirm that? Could there be a workaround?

@vania-pooh
Copy link
Member

@martingrossmann sorry for the delay. Checked source code. Currently selenoid:options namespace is not supported in Ggr. Ggr is only able to get keys either from desiredCapabilities or from capabilities > alwaysMatch \ firstMatch on the top level. So it will work like this:

{"capabilities": {"alwaysMatch": {"labels": {...}}}}

But this does not correspond to W3C standard. Probably we may need to add selenoid:options or ggr:options key and support it in Ggr.

@gogro
Copy link

gogro commented Dec 19, 2023

please do if you find the time, would be much appreciated.

@vania-pooh vania-pooh added this to the 1.7.2 milestone Dec 20, 2023
vania-pooh added a commit that referenced this issue Dec 31, 2023
Correctly processing extension capabilities (fixes #384)
@vania-pooh
Copy link
Member

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants