sidebar_label |
---|
Page.$ |
Runs document.querySelector
within the page. If no element matches the selector, the return value resolves to null
.
class Page {
$<Selector extends string>(
selector: Selector
): Promise<ElementHandle<NodeFor<Selector>> | null>;
}
Parameter |
Type |
Description |
---|---|---|
selector |
Selector |
A |
Promise<ElementHandle<NodeFor<Selector>> | null>