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

Add support for Selenium Grid #1023

Open
rzo1 opened this issue Jan 4, 2023 · 13 comments
Open

Add support for Selenium Grid #1023

rzo1 opened this issue Jan 4, 2023 · 13 comments
Assignees

Comments

@rzo1
Copy link
Contributor

rzo1 commented Jan 4, 2023

Mainly creating this issue as a possible future request for anyone, who has some time to contribute.

Selenium nowadays supports Selenium Grid . Selenium Grid runs in parallel on multiple machines (called Nodes) coordinated by a Hub instance.

Details can be found here: https://www.selenium.dev/documentation/grid/components/

Our current Selenium Protocol impl cannot deal with the Hub setting as we are using a LinkedBlockingQueue to handle multiple Selenium drivers (instances).

We should perhaps add an additional SeleniumGridProtocol, which can make use of Selenium Grid so we can fully leverage the grids distributed capabilities (instead using only one session of a given Selenium Grid)

@msghasan
Copy link
Contributor

msghasan commented Jan 4, 2023

That's very much needed shall I try it on my weekend and try to give a upgrade

@rzo1
Copy link
Contributor Author

rzo1 commented Jan 4, 2023

That's very much needed shall I try it on my weekend and try to give a upgrade

Sure. If you have some spare resources / time to work on it, feel free. A PR would be very much appreciated.

The grid deals with the queue / sessions ids, so we would need to build some logic to handle that on our side. I wouldn't change the current Selenium impl, though to avoid breaking users (not every body uses a Selenium grid).

@dhaneshsabane
Copy link

Referencing the detailed discussion we've had on #1092, a separate implementation for Selenium Grid makes sense.

@rzo1 , @jnioche - Shall I pick this up and raise a PR?

@jnioche
Copy link
Contributor

jnioche commented Sep 18, 2023

@rzo1 , @jnioche - Shall I pick this up and raise a PR?

This would be great, thanks

@dhaneshsabane
Copy link

@jnioche - Feel free to assign this issue to me.

@msghasan
Copy link
Contributor

I have the solution but being very busy nowadays, I thought of pushing it long back and forgot to do it...

@msghasan
Copy link
Contributor

I have pushed the solution to my fork. @jnioche @rzo1 Take a look if you feel the implementation is good to have let me know I will raise the PR. If not @dhaneshsabane can take some inspiration and ideas to further enhance from this. I am extremely sorry to delay this so much.

msghasan@4bfdba7

@msghasan
Copy link
Contributor

The changes produced in my previous message was tested in production environment and was getting used for our purpose.

@dhaneshsabane
Copy link

@msghasan - Thank you so much for sharing the implementation. I managed to deploy your changes to my server and get the setup working. However, I did have to make a couple of changes, primarily around how capabilities were set.

Do you want to raise this as a pull request @msghasan?

@rzo1
Copy link
Contributor Author

rzo1 commented Oct 19, 2023

So perhaps open a PR and collaborate in getting the required changes into that PR? ;-) Afterwards, we can do a review, etc.

@msghasan
Copy link
Contributor

@msghasan - Thank you so much for sharing the implementation. I managed to deploy your changes to my server and get the setup working. However, I did have to make a couple of changes, primarily around how capabilities were set.

Do you want to raise this as a pull request @msghasan?

ok let me provide the PR this weekend or I will take out some time after work to do it

@msghasan
Copy link
Contributor

@rzo1 @jnioche Please review the below PR and let me know your thoughts on this

#1123

@msghasan
Copy link
Contributor

# PR Explanation

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

4 participants