1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-30 13:58:08 +00:00

create deno-playwright

This commit is contained in:
Nebel 2024-10-29 14:44:38 +09:00
parent d314e83b18
commit 75ba18676f
Signed by: nebel
GPG key ID: 79807D08C6EF6460
4 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,4 @@
```
$ deno -A npm:playwright install
$ deno -A main.ts
```

View file

@ -0,0 +1,5 @@
{
"imports": {
"playwright": "npm:playwright@^1.48.2"
}
}

27
deno-playwright/deno.lock generated Normal file
View file

@ -0,0 +1,27 @@
{
"version": "4",
"specifiers": {
"npm:playwright@*": "1.48.2",
"npm:playwright@^1.48.2": "1.48.2"
},
"npm": {
"fsevents@2.3.2": {
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="
},
"playwright-core@1.48.2": {
"integrity": "sha512-sjjw+qrLFlriJo64du+EK0kJgZzoQPsabGF4lBvsid+3CNIZIYLgnMj9V6JY5VhM2Peh20DJWIVpVljLLnlawA=="
},
"playwright@1.48.2": {
"integrity": "sha512-NjYvYgp4BPmiwfe31j4gHLa3J7bD2WiBz8Lk2RoSsmX38SVIARZ18VYjxLjAcDsAhA+F4iSEXTSGgjua0rrlgQ==",
"dependencies": [
"fsevents",
"playwright-core"
]
}
},
"workspace": {
"dependencies": [
"npm:playwright@^1.48.2"
]
}
}

8
deno-playwright/main.ts Normal file
View file

@ -0,0 +1,8 @@
import { chromium } from "npm:playwright";
const browser = await chromium.launch({ headless: false });
const page = await browser.newPage();
await page.goto("https://example.com");
await new Promise((r) => setTimeout(r, 10_000));
await browser.close();