{"id":14978488,"url":"https://github.com/webdriverio-community/wdio-electron-service","last_synced_at":"2025-04-04T19:11:43.285Z","repository":{"id":37909228,"uuid":"436365783","full_name":"webdriverio-community/wdio-electron-service","owner":"webdriverio-community","description":"WebdriverIO service for testing Electron applications","archived":false,"fork":false,"pushed_at":"2025-03-31T23:04:11.000Z","size":16344,"stargazers_count":37,"open_issues_count":13,"forks_count":17,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-01T06:33:53.525Z","etag":null,"topics":["automation","desktop-application","e2e-testing","electron","electron-application","electronjs","webdriverio"],"latest_commit_sha":null,"homepage":"https://webdriver.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webdriverio-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-08T19:20:03.000Z","updated_at":"2025-03-27T16:27:00.000Z","dependencies_parsed_at":"2023-10-17T05:31:43.609Z","dependency_job_id":"357c0484-dada-41c8-aeb0-18f0d5a2cc00","html_url":"https://github.com/webdriverio-community/wdio-electron-service","commit_stats":{"total_commits":1901,"total_committers":16,"mean_commits":118.8125,"dds":"0.44292477643345607","last_synced_commit":"c4425fcabaf0381c612d0a8808eb91c5aa78ef8f"},"previous_names":[],"tags_count":129,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdriverio-community%2Fwdio-electron-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdriverio-community%2Fwdio-electron-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdriverio-community%2Fwdio-electron-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdriverio-community%2Fwdio-electron-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webdriverio-community","download_url":"https://codeload.github.com/webdriverio-community/wdio-electron-service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234921,"owners_count":20905854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","desktop-application","e2e-testing","electron","electron-application","electronjs","webdriverio"],"created_at":"2024-09-24T13:57:46.709Z","updated_at":"2025-04-04T19:11:43.265Z","avatar_url":"https://github.com/webdriverio-community.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WDIO Electron Service\n\n\u003ca href=\"https://www.npmjs.com/package/wdio-electron-service\" alt=\"NPM Version\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/wdio-electron-service\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/wdio-electron-service/v/lts\" alt=\"NPM LTS Version\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/wdio-electron-service/lts\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/wdio-electron-service/v/next\" alt=\"NPM Next Version\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/wdio-electron-service/next\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/wdio-electron-service\" alt=\"NPM Downloads\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/dw/wdio-electron-service\" /\u003e\u003c/a\u003e\n\n\u003cbr /\u003e\n\n**WebdriverIO service for testing Electron applications**\n\nEnables cross-platform E2E testing of Electron apps via the extensive WebdriverIO ecosystem.\n\nSpiritual successor to [Spectron](https://github.com/electron-userland/spectron) ([RIP](https://github.com/electron-userland/spectron/issues/1045)).\n\n### Features\n\nMakes testing Electron applications much easier via:\n\n- 🚗 auto-setup of required Chromedriver (for Electron v26 and above)\n- 📦 automatic path detection of your Electron application\n  - supports [Electron Forge](https://www.electronforge.io/), [Electron Builder](https://www.electron.build/) and unpackaged apps\n- 🧩 access Electron APIs within your tests\n- 🕵️ mocking of Electron APIs via a Vitest-like API\n\n## Installation\n\nYou will need to install `WebdriverIO`, instructions can be found [here](https://webdriver.io/docs/gettingstarted).\n\n## Quick Start\n\nThe recommended way to get up and running quickly is to use the [WDIO configuration wizard](https://webdriver.io/docs/gettingstarted#initiate-a-webdriverio-setup).\n\n### Manual Quick Start\n\nTo get started without using the configuration wizard, you will need to install the service and `@wdio/cli`:\n\n```bash\nnpm install --dev @wdio/cli wdio-electron-service\n```\n\nOr use your package manager of choice - pnpm, yarn, etc.\n\nNext, create your WDIO configuration file. If you need some inspiration for this, there is a working configuration in the [example directory](./example/wdio.conf.ts) of this repository, as well as the [WDIO configuration reference page](https://webdriver.io/docs/configuration).\n\nYou will need to add `electron` to your services array and set an Electron capability, e.g.:\n\n_`wdio.conf.ts`_\n\n```ts\nexport const config = {\n  // ...\n  services: ['electron'],\n  capabilities: [\n    {\n      browserName: 'electron',\n    },\n  ],\n  // ...\n};\n```\n\nFinally, [run some tests](https://webdriver.io/docs/gettingstarted#run-test) using your configuration file.\n\nThis will spin up an instance of your app in the same way that WDIO handles browsers such as Chrome or Firefox. The service works with [WDIO (parallel) multiremote](https://webdriver.io/docs/multiremote) if you need to run additional instances simultaneously, e.g. multiple instances of your app or different combinations of your app and a Web browser.\n\nIf you use [Electron Forge](https://www.electronforge.io/) or [Electron Builder](https://www.electron.build/) to package your app then the service will automatically attempt to find the path to your bundled Electron application. You can provide a custom path to the binary via custom service capabilities, e.g.:\n\n_`wdio.conf.ts`_\n\n```ts\nexport const config = {\n  // ...\n  capabilities: [\n    {\n      'browserName': 'electron',\n      'wdio:electronServiceOptions': {\n        appBinaryPath: './path/to/built/electron/app.exe',\n        appArgs: ['foo', 'bar=baz'],\n      },\n    },\n  ],\n  // ...\n};\n```\n\nSee the [configuration doc](./docs/configuration/service-configuration.md#appbinarypath) for how to find your `appBinaryPath` value for the different operating systems supported by Electron.\n\nAlternatively, you can point the service at an unpackaged app by providing the path to the `main.js` script. Electron will need to be installed in your `node_modules`. It is recommended to bundle unpackaged apps using a bundler such as Rollup, Parcel, Webpack, etc.\n\n_`wdio.conf.ts`_\n\n```ts\nexport const config = {\n  // ...\n  capabilities: [\n    {\n      'browserName': 'electron',\n      'wdio:electronServiceOptions': {\n        appEntryPoint: './path/to/bundled/electron/main.bundle.js',\n        appArgs: ['foo', 'bar=baz'],\n      },\n    },\n  ],\n  // ...\n};\n```\n\n## Chromedriver Configuration\n\n**If your app uses a version of Electron which is lower than v26 then you will need to [manually configure Chromedriver](./docs/configuration/chromedriver-configuration.md#user-managed).**\n\nThis is because WDIO uses Chrome for Testing to download Chromedriver, which only provides Chromedriver versions of v115 or newer.\n\n## Documentation\n\n**[Service Configuration](./docs/configuration/service-configuration.md)** \\\n**[Chromedriver Configuration](./docs/configuration/chromedriver-configuration.md)** \\\n**[Accessing Electron APIs](./docs/electron-apis/accessing-apis.md)** \\\n**[Mocking Electron APIs](./docs/electron-apis/mocking-apis.md)** \\\n**[Window Management](./docs/window-management.md)** \\\n**[Standalone Mode](./docs/standalone-mode.md)** \\\n**[Development](./docs/development.md)** \\\n**[Common Issues \u0026 Debugging](./docs/common-issues-debugging.md)**\n\n## Development\n\nRead the [development doc](./docs/development.md) if you are interested in contributing.\n\n## Example Integrations\n\nCheck out our [Electron boilerplate](https://github.com/webdriverio/electron-boilerplate) project that showcases how to integrate WebdriverIO in an example application. You can also have a look at the [Example Apps](./apps/) and [E2Es](./e2e/) directories in this repository.\n\n## Support\n\nIf you are having issues running WDIO with the service you should check the documented [Common Issues](./docs/common-issues.md) in the first instance, then open a discussion in the [main WDIO forum](https://github.com/webdriverio/webdriverio/discussions).\n\nThe Electron service discussion forum is much less active than the WDIO one, but if the issue you are experiencing is specific to Electron or using the service then you can open a discussion [here](https://github.com/webdriverio-community/wdio-electron-service/discussions).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdriverio-community%2Fwdio-electron-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebdriverio-community%2Fwdio-electron-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdriverio-community%2Fwdio-electron-service/lists"}