2023-03-27 11:16:51 +00:00
|
|
|
---
|
|
|
|
sidebar_label: DeviceRequestPrompt.waitForDevice
|
|
|
|
---
|
|
|
|
|
|
|
|
# DeviceRequestPrompt.waitForDevice() method
|
|
|
|
|
|
|
|
Resolve to the first device in the prompt matching a filter.
|
|
|
|
|
|
|
|
#### Signature:
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
class DeviceRequestPrompt {
|
|
|
|
waitForDevice(
|
|
|
|
filter: (device: DeviceRequestPromptDevice) => boolean,
|
|
|
|
options?: WaitTimeoutOptions
|
|
|
|
): Promise<DeviceRequestPromptDevice>;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2024-03-20 15:03:14 +00:00
|
|
|
<table><thead><tr><th>
|
2023-03-27 11:16:51 +00:00
|
|
|
|
2024-03-20 15:03:14 +00:00
|
|
|
Parameter
|
|
|
|
|
|
|
|
</th><th>
|
|
|
|
|
|
|
|
Type
|
|
|
|
|
|
|
|
</th><th>
|
|
|
|
|
|
|
|
Description
|
|
|
|
|
|
|
|
</th></tr></thead>
|
|
|
|
<tbody><tr><td>
|
|
|
|
|
|
|
|
filter
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
(device: [DeviceRequestPromptDevice](./puppeteer.devicerequestpromptdevice.md)) => boolean
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>
|
|
|
|
|
|
|
|
options
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
[WaitTimeoutOptions](./puppeteer.waittimeoutoptions.md)
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
_(Optional)_
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</tbody></table>
|
2023-03-27 11:16:51 +00:00
|
|
|
**Returns:**
|
|
|
|
|
|
|
|
Promise<[DeviceRequestPromptDevice](./puppeteer.devicerequestpromptdevice.md)>
|