28 lines
852 B
Markdown
28 lines
852 B
Markdown
---
|
|
sidebar_label: Page.waitForSelector_1
|
|
---
|
|
|
|
# Page.waitForSelector() method
|
|
|
|
**Signature:**
|
|
|
|
```typescript
|
|
class Page {
|
|
waitForSelector(
|
|
selector: string,
|
|
options?: Exclude<WaitForSelectorOptions, 'root'>
|
|
): Promise<ElementHandle | null>;
|
|
}
|
|
```
|
|
|
|
## Parameters
|
|
|
|
| Parameter | Type | Description |
|
|
| --------- | -------------------------------------------------------------------------------------- | ----------------- |
|
|
| selector | string | |
|
|
| options | Exclude<[WaitForSelectorOptions](./puppeteer.waitforselectoroptions.md), 'root'> | <i>(Optional)</i> |
|
|
|
|
**Returns:**
|
|
|
|
Promise<[ElementHandle](./puppeteer.elementhandle.md) \| null>
|