Closed christian-bromann closed 5 months ago
@christian-bromann this sounds somewhat related to #331 (the above bug in particular), do you think this feature would include starting electron without a binary or is it completely separate?
@goosewobbler these features are different. #331 is about allowing users to test an Electron app without bundling it. This issue describes a feature where a user can use this service without having to run the wdio testrunner. Imagine a Node.js script like this:
import { startSession } from 'wdio-electron-service`
const ide = await startSession({
electronVersion: '1.2.3',
appBinaryPath: './path/to/bundled/electron/app.exe',
appArgs: ['foo', 'bar=baz'],
})
where startSession
takes a parameter to define the Electron application (no WebdriverIO.Config
- instead only properties related for Electron automation) and returns a WebdriverIO.Browser
.
Got it, I was pretty sure they were separate but also had an optimistic thought that one might solve the other...perhaps if the testrunner is the root cause of the unbundled app not receiving args...let's see.
Thanks for the work @goosewobbler - I released the docs: https://webdriver.io/docs/desktop-testing/electron/standalone
This is inspired by a conversation in https://github.com/webdriverio/webdriverio/issues/12128
It would be nice to provide a way to allow users to use this service in a normal Node.js script without having to use the testrunner. I could see a custom
remote
method taking the same parameters as thewebdriverio
version would do but internally would run all the hooks before returning the instance. Note thatbeforeCommand
orafterCommand
work in standalone too.