import { Page } from "https://deno.land/x/fresh@1.4.3/tests/deps.ts";
page.setViewport
will resize the page. A lot of websites don't expect
phones to change size, so you should set the viewport before navigating to
the page.
In the case of multiple pages in a single browser, each page can have its own viewport size.
Examples
Example 1
Example 1
const page = await browser.newPage();
await page.setViewport({
width: 640,
height: 480,
deviceScaleFactor: 1,
});
await page.goto('https://example.com');