-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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]: Create separate NPM for Selenium Manager #11378
Comments
Ideally it would be great if Selenium Manager could package a WASM file and publish it to NPM with a minimal JS interface to run the features of the manager, e.g. install driver etc. I recently was working on a project with similar requirements. Happy to provide support if needed. |
Would that require putting the Rust code in the package? |
No. I recommend have a |
This assumes that we are going to make Selenium Manager releases, which I would like to. But so far we do not have consensus of that. Are we actually going to make releases or not? |
If supporting wdio is the primary argument in favor of independent release right now, I'd prefer finding an alternate way to support/distribute, at least until we have full functionality. Also, this isn't just one binary, but 3 because of different architectures, not sure how that works with npm. |
We have two use cases now, WebdriverIO and Docker images setup. |
It does, example case: https://github.com/webdriverio-community/node-geckodriver - the package downloads the binary from Github when the user uses the driver for the first time. Something similar could be done for an NPM package for Selenium Manager. |
Docker case is more an optimization(?) than new functionality.
|
The Docker case is just to use the functionality that already exists in Selenium Manager |
As I understand it, the Docker use case is to be able to load it as part of the Docker RUN command instead of the first time a session is requested by the entrypoint. There's no missing functionality right now with this scenario; Selenium Manager will just execute the first session request, it's just an optimization to start it at the beginning. |
Ok, yes. Optimization. |
But along those lines. Maybe we can document how people could execute selenium manager code to cache drivers without starting drivers? Not a use case I'd considered. |
That last comment would be much more easily done when we implement — #13022 |
@christian-bromann this is for a new "Selenium Manager" npm? If we release as part of Selenium, we can build / grab it dynamically without needing to have official releases. Can you provide an example file for what we need so we can figure out what it would take to release multiple npm packages with Bazel. (Simon is moving to updated rules which should make that easier) |
I recommend a simple wrapper module that downloads the binary if used the first time. See this example of the Geckodriver package. You can also include the binary to the NPM package but it feels like an unnecessary extra payload. I personally prefer NPM packages to be as small as possible. |
During the May 2024 Selenium Summit, we made the decision to implement this. |
Feature and motivation
Unlike the other bindings, there are various JavaScript projects (like webdriver.io) that can benefit from Selenium Manager being released as a separate package. @harsha509 mentioned it shouldn't be too challenging to figure out how to build it with Bazel. @christian-bromann might be able to provide feedback on requirements for this.
Usage example
n/a
The text was updated successfully, but these errors were encountered: