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]: Grid customizing outside of the Selenium project #11624

Closed
gadgadskiy opened this issue Feb 7, 2023 · 6 comments
Closed

[🚀 Feature]: Grid customizing outside of the Selenium project #11624

gadgadskiy opened this issue Feb 7, 2023 · 6 comments
Labels
I-question Applied to questions. Issues should be closed and send the user to community resources.

Comments

@gadgadskiy
Copy link

gadgadskiy commented Feb 7, 2023

Feature and motivation

Hi, team!
I have a big project on Selenium 3 with a few of our custom features, and we want to save them during the migration to Selenium 4.
While diving into your current code, I faced a problem: I couldn't extend components located in org.openqa.selenium.grid.* package:

  1. I can't add your pom as a parent because it has a packaging "jar."
  2. The packages are still absent after adding your artifacts as dependencies (selenium-java, selenium-dev tools-v109, etc.). The last version where I saw them is 4.0.0-alpha-2.

Maybe I skipped the other abilities to add customizing, which lies on the surface. What is the easiest way to extend grid features in my custom project?

Usage example

I want to implement in the separate project classes like org.openqa.selenium.grid.data.SlotMatcher, org.openqa.selenium.grid.node.Node, etc.

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

@gadgadskiy, 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!

@krmahadevan
Copy link
Contributor

@gadgadskiy - To learn how to build your own node, please refer to https://www.selenium.dev/documentation/grid/advanced_features/customize_node/

@krmahadevan
Copy link
Contributor

krmahadevan commented Feb 7, 2023

For working with a custom slot matcher (an implementation of org.openqa.selenium.grid.data.SlotMatcher) , you can pass in a fully qualified class name via the parameter ----slot-matcher when you start the hub (or) distributor

To get detailed help run java -jar selenium-server-4.8.0.jar hub --help

I can't add your pom as a parent because it has a packaging "jar."

You can create your parent pom file which brings in the selenium dependencies as dependencies which you can extend from. Would that not work ?

What is the easiest way to extend grid features in my custom project?

Apart from the already called out ones, can you please call out explicitly as to what all are you looking at customizing?

If you are looking at adding your own custom grid ui, then it wont be possible out of the box, but you can always build a simple web application that basically uses the endpoints as explained here to slurp data and then visualise them on the UI.

The grid now lets you build persistence and thus allows you to scale horizontally the hub (which was earlier the single point of contention). Please refer to this document for more details https://www.selenium.dev/documentation/grid/advanced_features/external_datastore/

@diemol
Copy link
Member

diemol commented Feb 7, 2023

Thanks for triaging and clarifying, @krmahadevan!

@gadgadskiy, feel free to join us in our chat if you have more questions.

@diemol diemol added I-question Applied to questions. Issues should be closed and send the user to community resources. and removed I-enhancement needs-triaging labels Feb 7, 2023
@github-actions
Copy link

github-actions bot commented Feb 7, 2023

💬 Please ask questions at:

@github-actions github-actions bot closed this as completed Feb 7, 2023
@gadgadskiy
Copy link
Author

Hi, @krmahadevan. Thank you for the clarification!
The dependency "selenium-grid" mentioned in the article about a custom node is exactly what I need now.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I-question Applied to questions. Issues should be closed and send the user to community resources.
Projects
None yet
Development

No branches or pull requests

3 participants