How to resize Playwright browser window?

There is the method
page.setViewportSize()
(https://playwright.dev/docs/api/class-page#page-set-viewport-size)
to resize Playwright browser window.

With Crawlee/PlaywrightCrawler, How can I set the size of browser window ?

const crawler = new PlaywrightCrawler({
    // Stop crawling after 5 pages
    maxRequestsPerCrawl: 5,
    // https://crawlee.dev/api/playwright-crawler/interface/PlaywrightLaunchContext
    launchContext: {
        // https://crawlee.dev/api/playwright-crawler/interface/PlaywrightLaunchContext#launchOptions
        launchOptions: {
            stealth: true,
            headless: false,
        },
?????
    }, .....
* extends: [EventEmitter]
Was this page helpful?