Skip to content

Commit 58e471d

Browse files
committed
Changed page viewport height
1 parent 65d443b commit 58e471d

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

chromium.png

-8.16 KB
Loading

index.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ const { webkit } = require("playwright-webkit");
55

66
(async () => {
77
// const browser = await firefox.launch({ headless: false })
8-
// const browser = await chromium.launch({ headless: false })
9-
const browser = await webkit.launch({ headless: false })
8+
const browser = await chromium.launch({ headless: false })
9+
// const browser = await webkit.launch({ headless: false })
1010
const context = await browser.newContext()
1111
context.setDefaultTimeout(9999999)
12-
const page = await context.newPage()
12+
const page = await context.newPage({
13+
viewport: {
14+
height: 2000,
15+
}
16+
})
1317

1418
await page.goto(`file:${path.join(__dirname, "index.html")}`) // 2. firefox not resolving page.goto file:
1519
console.log("FIREFOX not outputting this")
@@ -35,8 +39,8 @@ const { webkit } = require("playwright-webkit");
3539
width: widthStart,
3640
height: 1000, // 2. chromium and webkit not using the height here
3741
},
38-
// path: "./chromium.png",
39-
path: "./webkit.png",
42+
path: "./chromium.png",
43+
// path: "./webkit.png",
4044
})
4145
console.log("FINISH")
4246
await browser.close()

webkit.png

39.2 KB
Loading

0 commit comments

Comments
 (0)