2020-01-11 01:03:10 +01:00
|
|
|
<script src='../../web.js'></script>
|
|
|
|
|
<script>
|
|
|
|
|
async function setup(product, connectOptions) {
|
2020-01-14 02:36:46 +01:00
|
|
|
window.browser = await window.playwrightweb[product].connect(connectOptions);
|
2020-01-11 01:03:10 +01:00
|
|
|
window.context = await window.browser.newContext();
|
|
|
|
|
window.page = await window.context.newPage();
|
|
|
|
|
}
|
|
|
|
|
async function teardown() {
|
|
|
|
|
await window.context.close();
|
|
|
|
|
await window.browser.disconnect();
|
|
|
|
|
}
|
|
|
|
|
</script>
|