playwright/test/assets/playwrightweb.html
Dmitry Gozman b388722777
chore: update top-level api (#479)
```
require('playwright').chromium.launch(...)
window.playwrightweb.chromium.connect(...)
```
2020-01-13 17:36:46 -08:00

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>