-
-
Save andersk/96a04d05e1bd55c2754c514dd547d1e3 to your computer and use it in GitHub Desktop.
Test case for microsoft/playwright#19412
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { BrowserWindow, app, protocol } = require("electron"); | |
protocol.registerSchemesAsPrivileged([]); | |
app.whenReady().then(() => { | |
const win = new BrowserWindow(); | |
win.loadURL("data:text/plain,Hello, world!"); | |
}); | |
app.on("window-all-closed", () => { | |
app.quit(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"test": "node test.js" | |
}, | |
"dependencies": { | |
"electron": "^22.0.0", | |
"playwright-core": "^1.28.1" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { _electron } = require("playwright-core"); | |
(async () => { | |
const app = await _electron.launch({ args: ["."] }); | |
const win = await app.firstWindow(); | |
console.log("text =", await win.innerText(":root")); | |
app.close(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment