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

[🚀 Feature]: Supporting custom capabilities mutators for Grid #13628

Open
Purus opened this issue Feb 26, 2024 · 11 comments · May be fixed by #13672
Open

[🚀 Feature]: Supporting custom capabilities mutators for Grid #13628

Purus opened this issue Feb 26, 2024 · 11 comments · May be fixed by #13672
Labels
help wanted Issues looking for contributions I-enhancement

Comments

@Purus
Copy link

Purus commented Feb 26, 2024

Feature and motivation

This is similar to the feature proposed in #7478. But it was closed due to lack of user feedback and it was Selenium 3 Grid.

Currently we have an option to provide a custom slot matcher via mode config. Similarly there should be an option to specify custom capabilities mutators via configuration.

SlotMatchrer can only return a boolean after performing custom matching logic and the actual capabilities does not really understand any change.

The above closed issue highlights SessionCapabilitiesMutator but there are no way to provide custom capabilities mutators.

In my use case, when capabilities have certain values I want to update them.

Usage example

As part of mode config, both slot matcher and capabilities mutators can also be specified.

slot-matcher = "com.CustomSlotMatcher"
capabilities-mutator = "com.CustomMutator"

It will help to configure the grid without customising the node just for this feature.

Copy link

@Purus, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@diemol
Copy link
Member

diemol commented Feb 26, 2024

What is the use case to override that class?

@Purus
Copy link
Author

Purus commented Mar 1, 2024

The grid gets updated often with new version of browsers.. But the users may have used old capabilities during the test execution.

Instead of failing the request, we would like to enforce the version and update the incoming enrichment to the actual version..

@diemol
Copy link
Member

diemol commented Mar 1, 2024

So the user would be testing with a different browser instead of the one they requested. I don't think that makes sense.

@Purus
Copy link
Author

Purus commented Mar 1, 2024 via email

@diemol
Copy link
Member

diemol commented Mar 4, 2024

I theory, Grid supports stable, and it should match the recent browser release. @titusfortner worked on it.

@Purus
Copy link
Author

Purus commented Mar 4, 2024 via email

@diemol
Copy link
Member

diemol commented Mar 4, 2024

Would you like to send a PR for it?

@diemol diemol added help wanted Issues looking for contributions and removed R-awaiting answer labels Mar 4, 2024
Copy link

github-actions bot commented Mar 4, 2024

This issue is looking for contributors.

Please comment below or reach out to us through our IRC/Slack/Matrix channels if you are interested.

@Purus
Copy link
Author

Purus commented Mar 4, 2024 via email

Purus added a commit to Purus/selenium that referenced this issue Mar 10, 2024
Custom capability mutators(with ordering priority) can be placed as part of Grid setup and will be used.

Fixes SeleniumHQ#13628
@Purus Purus linked a pull request Mar 10, 2024 that will close this issue
8 tasks
Purus added a commit to Purus/selenium that referenced this issue Mar 10, 2024
Custom capability mutators(with ordering priority) can be placed as part of Grid setup and will be used.

Fixes SeleniumHQ#13628
@Purus
Copy link
Author

Purus commented Mar 10, 2024

@diemol can you please help with the review of the PR? This is my first contribution to selenium.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues looking for contributions I-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants