Open
Description
System info
- Playwright Version: [v1.34.3]
- Operating System: observed on Windows 11
- Browser: Electron
- Other info: Regression of [Feature] A way to determine whether an Electron app is executed via Playwright #16614 and chore(electron): put client-provided arguments in front #16782. See also this comment and this comment (and below). It seems to be introduced by commit 5c53015 but I didn't found any useful information in the referenced PR chore(electron): filter test args out #18822
Source code
- I provided exact source code that allows reproducing the issue locally.
const electronPath = require("electron")
const playwright = require("playwright")
const electron = playwright._electron
// ...
const app = await electron.launch({
args: [
"path/to/main.js",
"path/to/my/file",
],
executablePath: electronPath,
})
Expected
Given, the code above, process.argv
should look like this:
[
'path/to/Electron',
'path/to/project',
'path/to/my/file',
'--inspect=0',
'--remote-debugging-port=0',
]
Actual
process.argv
looks like this:
[
'path/to/Electron',
'--inspect=0',
'--remote-debugging-port=0',
'path/to/project',
'path/to/my/file',
]