[BUG] electronApp.firstWindow never returns any windows
See original GitHub issueContext:
- Playwright Version: 1.21.0
- Operating System: Mac
- Node.js version: 16.5
- Browser: Electron
Code Snippet
import { _electron as electron } from 'playwright';
import { test } from '@playwright/test';
test('Launch electron app', async () => {
const electronApp = await electron.launch({ args: ['out/mac/MyApp.app/Contents/Resources/app.asar/dist/main/index.cjs'], executablePath: './out/mac/MyApp.app/Contents/MacOS/MyApp' });
const window = await electronApp.firstWindow();
console.log(await window.title());
await electronApp.close();
});
Describe the bug
await electronApp.firstWindow
never resolves with the window even though the window is indeed open
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
App Starts and Stops Immediately Without Launching Window ...
I'm using the latest version of electron quick start, and ignore-scripts is set to false. I don't have Vue devtools, and I've never...
Read more >Electron Window does not open, but doesn't show any errors
When I try running my electron app, I receive no errors and it seems like it compiles, but the electron window does not...
Read more >app | Electron
Returns : event Event. Emitted when all windows have been closed and the application will quit. Calling event.preventDefault() will prevent the default ...
Read more >Running Fully Automated E2E Tests in Electron in a Docker ...
electronApp = await _electron.launch({ ... The common-setup.ts file is a base for all our tests. ... expect(windows.length).to.equal(1);.
Read more >ElectronApplication | Playwright - CukeTest
getAppPath(); }); console.log(appPath); // Get the first window that the app opens, wait if necessary. const window = await electronApp.firstWindow() ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ahadcove no ideas. I’d recommend slowly iterating from a basic working app towards your complicated non-working to find out the culprit.
@aslushnikov i still haven’t been able to reproduce this on a repo outside of mine. Any idea why playwright wouldn’t be able to see the app opening a window when the app is signed and packaged?