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

Clean up capabilities of non-W3C capability names #253

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions ui/src/containers/Capabilities/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ enableVideo: false
`,
curl: `curl -X POST 'http://127.0.0.1:4444/wd/hub/session' -d '{
"desiredCapabilities":{
"browserName":"${browser}",
"browserName": "${browser}",
"version": "${version}",
"platform":"ANY",
"platform": "ANY",
"enableVNC": true,
"name": "this.test.is.launched.by.curl",
"sessionTimeout": "120s"
}
},
"capabilities": {
"browserName": "${browser}",
"browserVersion": "${version}"
}
}'
`,
java: `DesiredCapabilities capabilities = new DesiredCapabilities();
Expand Down Expand Up @@ -185,15 +189,8 @@ const Launch = ({ browser: { name, version }, history }) => {
name: "Manual session",
},
capabilities: {
alwaysMatch: {
browserName: `${name}`,
browserVersion: `${version}`,
"selenoid:options": {
enableVNC: true,
sessionTimeout: "60m",
labels: { manual: "true" },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is breaking change actually

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was following another documentation and also the Selenium-Webdriver implementation.

An even the mozilla mention the list of as:

  • acceptInsecureCerts
  • browserName
  • browserVersion
  • platformName
  • pageLoadStrategy
  • proxy
  • setWindowRect
  • timeouts
  • unhandledPromptBehavior

Therefore limiting the capabilities just to the allowed properties should not brake anything. I test it locally with out issues. Also while adding firstMatch or alwaysMatch is accepted it does create an issue for Microsoft Edge. The selenoid:options are still passed, but in the desiredCapabilities without having the use the reserve name selenoid:options.

},
},
browserName: `${name}`,
browserVersion: `${version}`,
},
},
}).pipe(
Expand Down