mirror of
https://github.com/kou029w/_.git
synced 2025-01-30 13:58:08 +00:00
create deno-playwright
This commit is contained in:
parent
d314e83b18
commit
75ba18676f
4 changed files with 44 additions and 0 deletions
4
deno-playwright/README.md
Normal file
4
deno-playwright/README.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
```
|
||||||
|
$ deno -A npm:playwright install
|
||||||
|
$ deno -A main.ts
|
||||||
|
```
|
5
deno-playwright/deno.json
Normal file
5
deno-playwright/deno.json
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"imports": {
|
||||||
|
"playwright": "npm:playwright@^1.48.2"
|
||||||
|
}
|
||||||
|
}
|
27
deno-playwright/deno.lock
generated
Normal file
27
deno-playwright/deno.lock
generated
Normal 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
8
deno-playwright/main.ts
Normal 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();
|
Loading…
Add table
Reference in a new issue