docs/api/puppeteer.devicerequestprompt.md
Device request prompts let you respond to the page requesting for a device through an API like WebBluetooth.
export declare abstract class DeviceRequestPrompt
DeviceRequestPrompt instances are returned via the Page.waitForDevicePrompt() method.
const [devicePrompt] = Promise.all([
page.waitForDevicePrompt(),
page.click('#connect-bluetooth'),
]);
await devicePrompt.select(
await devicePrompt.waitForDevice(({name}) => name.includes('My Device')),
);
Property
</th><th>Modifiers
</th><th>Type
</th><th>Description
</th></tr></thead> <tbody><tr><td><span id="devices">devices</span>
</td><td>readonly
Current list of selectable devices.
</td></tr> </tbody></table>Method
</th><th>Modifiers
</th><th>Description
</th></tr></thead> <tbody><tr><td><span id="cancel">cancel()</span>
</td><td> </td><td>Cancel the prompt.
</td></tr> <tr><td><span id="select">select(device)</span>
</td><td> </td><td>Select a device in the prompt's list.
</td></tr> <tr><td><span id="waitfordevice">waitForDevice(filter, options)</span>
</td><td> </td><td>Resolve to the first device in the prompt matching a filter.
</td></tr> </tbody></table>