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

Provide utility function to allow using this service without the testrunner #412

Closed
christian-bromann opened this issue Jan 31, 2024 · 4 comments · Fixed by #521
Closed
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@christian-bromann
Copy link
Contributor

This is inspired by a conversation in webdriverio/webdriverio#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 the webdriverio version would do but internally would run all the hooks before returning the instance. Note that beforeCommand or afterCommand work in standalone too.

@goosewobbler
Copy link
Member

goosewobbler commented Feb 10, 2024

@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?

@christian-bromann
Copy link
Contributor Author

@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.

@goosewobbler
Copy link
Member

goosewobbler commented Feb 13, 2024

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.

@goosewobbler goosewobbler added this to the 6.x.y milestone Feb 19, 2024
@goosewobbler goosewobbler changed the title (feat): provide utility function to allow using this service without the testrunner Provide utility function to allow using this service without the testrunner Mar 19, 2024
@goosewobbler goosewobbler removed the help wanted Extra attention is needed label Apr 9, 2024
@goosewobbler goosewobbler self-assigned this Apr 9, 2024
@goosewobbler goosewobbler linked a pull request Apr 9, 2024 that will close this issue
8 tasks
@goosewobbler goosewobbler modified the milestones: 6.x.y, 7.0.0 Apr 18, 2024
@christian-bromann
Copy link
Contributor Author

Thanks for the work @goosewobbler - I released the docs: https://webdriver.io/docs/desktop-testing/electron/standalone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants