<titledata-rh="true">CustomQueryHandler interface | Puppeteer</title><metadata-rh="true"name="twitter:card"content="summary_large_image"><metadata-rh="true"property="og:url"content="https://pptr.dev/api/puppeteer.customqueryhandler"><metadata-rh="true"name="docusaurus_locale"content="en"><metadata-rh="true"name="docsearch:language"content="en"><metadata-rh="true"name="docusaurus_version"content="16.0.0"><metadata-rh="true"name="docusaurus_tag"content="docs-default-16.0.0"><metadata-rh="true"name="docsearch:version"content="16.0.0"><metadata-rh="true"name="docsearch:docusaurus_tag"content="docs-default-16.0.0"><metadata-rh="true"property="og:title"content="CustomQueryHandler interface | Puppeteer"><metadata-rh="true"name="description"content="Contains two functions queryOne and queryAll that can be 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 or Array with all the elements that match the given query selector."><metadata-rh="true"property="og:description"content="Contains two functions queryOne and queryAll that can be 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 or Array with all the elements that match the given query selector."><linkdata-rh="true"rel="icon"href="/img/favicon.ico"><linkdata-rh="true"rel="canonical"href="https://pptr.dev/api/puppeteer.customqueryhandler"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/api/puppeteer.customqueryhandler"hreflang="en"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/api/puppeteer.customqueryhandler"hreflang="x-default"><linkrel="stylesheet"href="/assets/css/styles.39576fb3.css">