Skip to main content
Go to Latest
interface CustomQueryHandler
Re-export
import { type CustomQueryHandler } from "https://deno.land/x/puppeteer@14.1.1/vendor/puppeteer-core/puppeteer/api-docs-entry.d.ts";

Contains two functions queryOne and queryAll that can be Puppeteer.registerCustomQueryHandler | registered as alternative querying strategies. The functions queryOne and queryAll are executed in the page context. queryOne should take an Element and a selector string as argument and return a single Element or null if no element is found. queryAll takes the same arguments but should instead return a NodeListOf<any> or Array<any> with all the elements that match the given query selector.

Properties

optional
queryOne: (element: any, selector: string) => any | null
optional
queryAll: (element: any, selector: string) => any[]