mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 21:53:35 +03:00
b388722777
``` require('playwright').chromium.launch(...) window.playwrightweb.chromium.connect(...) ```
12 lines
386 B
HTML
12 lines
386 B
HTML
<script src='../../web.js'></script>
|
|
<script>
|
|
async function setup(product, connectOptions) {
|
|
window.browser = await window.playwrightweb[product].connect(connectOptions);
|
|
window.context = await window.browser.newContext();
|
|
window.page = await window.context.newPage();
|
|
}
|
|
async function teardown() {
|
|
await window.context.close();
|
|
await window.browser.disconnect();
|
|
}
|
|
</script> |