Closed gootaoo closed 1 year ago
Hi , I couldn't able to import electron from playwright, I am currently using version 1.25.2, I tried to run a basic test to launch teams desktop app on windows 10 machine, since the import wasn't successful, could able to run it . could you let us know how did you able to import electron from playwright and lauch electron app locally ?
here is how you might run the exe
let electronApp: ElectronApplication;
electronApp = await electron.launch({
executablePath: 'C:\\path\\to\\exe',
});
electronApp.on('window', async (page) => {
//this is called within electron
});
await electronApp.evaluate(
async ({ BrowserWindow }) => {
// this is also from electron
});
Hi @2BC-Wasabi, thanks for reaching out , since I didn't install the playwright-core package I couldn't able to access the underlying _electron from it, thanks for sharing the above snippet.
Sounds like this is resolved. I'm going to close the issue. Feel free to reopen if I'm incorrect.
can you provide more details for me it worked.