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

26 lines
735 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; [BrowserContext](./puppeteer.browsercontext.md) &gt; [waitForTarget](./puppeteer.browsercontext.waitfortarget.md)
## BrowserContext.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;