I am trying to use wdio for my electron project, its working very well when runing it on the build (release/win-unpacked/)
but when I set the configuration file to use it directly in dev mode
capabilities: [{
browserName: 'electron',
// Electron service options
// see https://webdriver.io/docs/desktop-testing/electron/configuration/#service-options
'wdio:electronServiceOptions': {
// custom application args
appBinaryPath: `${process.cwd()}/node_modules/electron/dist/electron.exe`,
appArgs: [`app=${process.cwd()}/.`]
},
}],
I get an error, Electron is runing but I am getting : Cannot find module “myprojectPath/node_modules/electron/main”
I am using Electron 28, “wdio-electron-service”: “6.6.1”, “@wdio/cli”: “8.39.0”,
I tried all possible combination for the appArgs without success.
for exemple appArgs: [‘app=.’]
When i try to run the command “./node_modules/electron/dist/electron.exe .” or “./node_modules/electron/dist/electron.exe –app=.” from my project root folder its wokring well and running my application.
khaldoun kassem is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.