puppeteer/new-docs/puppeteer.page.waitforselector.md

28 lines
754 B
Markdown
Raw Normal View History

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Page](./puppeteer.page.md) &gt; [waitForSelector](./puppeteer.page.waitforselector.md)
## Page.waitForSelector() method
<b>Signature:</b>
```typescript
waitForSelector(selector: string, options?: {
visible?: boolean;
hidden?: boolean;
timeout?: number;
}): Promise<ElementHandle | null>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| selector | string | |
| options | { visible?: boolean; hidden?: boolean; timeout?: number; } | |
<b>Returns:</b>
Promise&lt;[ElementHandle](./puppeteer.elementhandle.md) \| null&gt;