Skip to main content
The Deno 2 Release Candidate is here
Learn more
Go to Latest
method Frame.prototype.$eval
import { Frame } from "https://deno.land/x/puppeteer@14.1.1/vendor/puppeteer-core/puppeteer/common/FrameManager.d.ts";

Examples

Example 1

const searchValue = await frame.$eval('#search', el => el.value);

Type Parameters

ReturnType

Parameters

selector: string
  • the selector to query for
pageFunction: (element: any, ...args: unknown[]) => ReturnType | Promise<ReturnType>
  • the function to be evaluated in the frame's context
  • additional arguments to pass to pageFunction