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

Find new port if already taken #21

Closed
matthewmcgarvey opened this issue Jan 13, 2022 · 2 comments · Fixed by #30
Closed

Find new port if already taken #21

matthewmcgarvey opened this issue Jan 13, 2022 · 2 comments · Fixed by #30

Comments

@matthewmcgarvey
Copy link
Collaborator

Related to #20

In LuckyFlow we're working towards allowing the registration of drivers. Two drivers are going to be chrome and chrome headless. If you try to run your specs with a mix of the two, when it gets to the end of the specs you get an error when it tries to close the second driver because the first already closed the process (see related issue). The problem is that they shouldn't be sharing a process. If you use 50 different registered drivers all connecting to chrome, it should use 50 different chrome processes.

Selenium ruby library has a PortProber and we should look into adding something similar https://github.com/SeleniumHQ/selenium/blob/trunk/rb/lib/selenium/webdriver/common/port_prober.rb

@Dakad
Copy link
Contributor

Dakad commented May 5, 2023

Hey Matthew 👋
I'm going to tackle this issue. I need this fix to move on with a project. I'm quite a noob to Selenium architecture.
I checked the link you posted for the PortProber and how it's used in the service_manager.rb: https://github.com/SeleniumHQ/selenium/blob/a6d74f9569b29b5358f13747947f155db93a64b4/rb/lib/selenium/webdriver/common/service_manager.rb#L106

Do you have any new info or suggestions?

@matthewmcgarvey
Copy link
Collaborator Author

No, I don't have anything new. Thanks for picking this up, and let me know if you need any help 👍

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

Successfully merging a pull request may close this issue.

2 participants