Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

This was released in https://github.com/aerokube/ggr/releases/tag/1.7.2.

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

No branches or pull requests

3 participants