playwright
playwright copied to clipboard
[BUG] opening new windows electron
Context:
- Playwright Version: 1.24.2]
- Operating System: Windows 10
- Node.js version: v16.15.0
- Browser: Electron
- Extra: electron react boiler plate
//this is how i launch the app this is in the before all
electronApp = await electron.launch({
executablePath: 'C:\\myApp\\myApp.exe',
});
electronApp.on('window', (page) => {
console.log('another window created');
});
test('test record', async () => {
await SetupWin.locator('button:has-text("Launch")').click();
//do i need the next line to wait for the second window to launch ?
await SetupWin.waitForTimeout(10000);
mywindows = await electronApp.windows();
console.log(mywindows);
});
so i have a page for setup where the user selects configurations for the next window when he clicks launch i setup the next window and i launch it.
i noticed that when doing so there is only two windows when i expect 3, also the on window event doesn't launch.
interestingly, i have a config file that i use to control things when testing the production app, one of the options is opendevtools, when i set it to true then, everything seems to work still need to test
Thanks for your report! Can you please share a link to repo that we can clone and run that exhibits the behavior? This will help us debug faster and ensure we are solving the issue you are facing.
hi i will try to make a repo and publish it asap.
Closing as part of triage per-above. Please file a new issue with the information requested above, and reference this issue.
Thanks!