docs/api/puppeteer.elementhandle._.md
Queries the current element for an element matching the given selector.
class ElementHandle {
$<Selector extends string>(
selector: Selector,
): Promise<ElementHandle<NodeFor<Selector>> | null>;
}
Parameter
</th><th>Type
</th><th>Description
</th></tr></thead> <tbody><tr><td>selector
</td><td>Selector
</td><td>selector to query the page for. CSS selectors can be passed as-is and a Puppeteer-specific selector syntax allows querying by text, a11y role and name, and xpath and combining these queries across shadow roots. Alternatively, you can specify the selector type using a prefix.
</td></tr> </tbody></table>Returns:
Promise<ElementHandle<NodeFor<Selector>> | null>
A element handle to the first element matching the given selector. Otherwise, null.