import { Page } from "https://deno.land/x/astral@0.3.5/mod.ts";
Page provides methods to interact with a single tab in the browser
Constructors
Properties
Methods
Runs document.querySelector
within the page. If no element matches the selector, the return value resolves to null
.
The method runs document.querySelectorAll
within the page. If no elements match the selector, the return value resolves to []
.
If no URLs are specified, this method returns cookies for the current page URL. If URLs are specified, only cookies for those URLs are returned.
Deletes browser cookies with matching name and url or domain/path pair.
Runs a function in the context of the page
page.setViewportSize()
will resize the page. A lot of websites don't expect phones to change size, so you should set the viewport size before navigating to the page.
Runs a function in the context of the page until it returns a truthy value.
Create a promise which resolves when network is idle
Wait for the selector
to appear in page. If at the moment of calling the method the selector
already exists, the method will return immediately. If the selector
doesn't appear after the timeout milliseconds (10000 by default) of waiting, the function will throw.