import { ElementHandle } from "https://deno.land/x/astral@0.2.1/mod.ts";
ElementHandle represents an in-page DOM element.
Methods
boundingBox(): Promise<BoundingBox | null>
This method returns boxes of the element, or null
if the element is not visible.
This method scrolls element into view if needed, and then uses Page.mouse
to click in the center of the element.
screenshot(opts?: Omit<ScreenshotOptions, "clip">)
This method scrolls element into view if needed, and then uses Page.screenshot()
to take a screenshot of the element.
type(text: string, opts?: KeyboardTypeOptions)
Focuses the element, and then sends a keydown
, keypress
/input
, and keyup
event for each character in the text.
waitForSelector(selector: string)
Wait for an element matching the given selector to appear in the current element.