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]: Support Electron #13954

Open
diemol opened this issue May 16, 2024 · 2 comments
Open

[🚀 Feature]: Support Electron #13954

diemol opened this issue May 16, 2024 · 2 comments

Comments

@diemol
Copy link
Member

diemol commented May 16, 2024

Feature and motivation

Right now, to run tests on electron apps, it pretty much requires a JavaScript dev environment. Electron versions are defined in the development directory, and npm is used to install the correct version of chromedriver via electron-chromedriver.npm

So the proposal is:

  1. Create an ElectronOptions class that is a subclass of ChromiumOptions, where the browser name is electron.
  2. Create an ElectronDriver class that requires an ElectronOptions argument, and errors if the binary has not been set
  3. Create an ElectronService in case the user wants to specify the location of the chromedriver (maybe?)
  4. Selenium Manager downloads the driver from https://github.com/electron/electron/releases based on the specified version, or gets the latest. I think we should not try to automatically determine the version of the electron app; the app is bundled with a specific runtime version but it appears to be quite challenging to actually surface the version of it.

Usage example

ElectronOptions options = new ElectronOptions();
options.browserVersion = "29.0";
options.binary = "/path/to/electron/app";

ElectronDriver driver = new ElectronDriver(options);
@titusfortner
Copy link
Member

I updated the description here.
An example of how users are currently working with electron can be found in the Sauce docs

The bindings work should be easy, not certain about the selenium manager piece with the naming conventions

@titusfortner titusfortner added this to the Selenium 5.0 milestone May 20, 2024
@Delta456
Copy link
Contributor

Delta456 commented Oct 4, 2024

I can implement this in Python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Low
Development

No branches or pull requests

3 participants