-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Remove require of websocket in selenium-devtools gem #10868
Conversation
In cd69898 the dependency of websocket was removed from selenium-devtools gem. When this gem is required it raises an error of: `cannot load such file -- websocket (LoadError)` We experienced this error because we updated selenium-devtools and hadn't updated selenium-webdriver. We found the problem was resolved by updating selenium-webdriver as that has a websocket dependency cd69898
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thanks. This also needs to change the required version of selenium-webdriver to the one that added the requirement.
Hmm do you mean in selenium-devtools? That doesn't currently have a defined dependency on selenium-webdriver |
Hah, yes, then we need to add it for this. |
Sure, it seems a little odd to add because selenium-devtools doesn't actually reference selenium-webdrivers. So won't make use of the dependency. So I guess the value in doing so would just be to just to force a constraint onto selenium-webdriver given Rubygems doesn't have a concept like peer dependencies which this seems to be. I'd guess for that it'd be a constraint of If you've got a clear idea of what's needed do feel free to just push it to my branch if that's easier. |
It's not really possible to use s.add_runtime_dependency 'selenium-webdriver', '~> 4.2' |
I agree it is weird, but it isn't really a peer dependency because |
Selenium-devtools is an optional add-on for selenium-webdriver, thus the only way that we can define interoperability is from a dependency on webdriver from devtools. In order for devtools to operate correctly with webdriver it needs to be using a minimum version of 4.2 (as there was a dependency change of websocket [1]). As per the suggestion in #10868 (comment) this adopts a pessimistic version constraint that will need to be updated if selenium-webdriver has a major version update. [1]: cd69898
Thanks! |
Description
In cd69898 the dependency of websocket was removed from selenium-devtools gem. When this gem is required it raises an error of:
cannot load such file -- websocket (LoadError)
We experienced this error because we updated selenium-devtools and hadn't updated selenium-webdriver. We found the problem was resolved by updating selenium-webdriver as that has a websocket dependency cd69898
Motivation and Context
Resolve an error when requiring the selenium-devtools gem
Types of changes
Checklist