puppeteer/new-docs/puppeteer.browser.waitfortarget.md

28 lines
777 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; [Browser](./puppeteer.browser.md) &gt; [waitForTarget](./puppeteer.browser.waitfortarget.md)
## Browser.waitForTarget() method
<b>Signature:</b>
```typescript
waitForTarget(predicate: (x: Target) => boolean, options?: {
timeout?: number;
}): Promise<Target>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| predicate | (x: [Target](./puppeteer.target.md)<!-- -->) =&gt; boolean | |
| options | { timeout?: number; } | |
<b>Returns:</b>
Promise&lt;[Target](./puppeteer.target.md)<!-- -->&gt;
{<!-- -->!Promise<!-- -->&lt;<!-- -->!Target<!-- -->&gt;<!-- -->}