mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 22:22:53 +03:00
13 lines
413 B
HTML
13 lines
413 B
HTML
<script src='../../web.js'></script>
|
|
<script>
|
|
async function setup(product, connectOptions) {
|
|
window.connect = window.playwrightweb(product);
|
|
window.browser = await window.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> |