Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteTo select a device requested by a page in Puppeteer, start page.waitForDevicePrompt() before triggering the request, wait for a matching entry with prompt.waitForDevice(), then pass it to prompt.select(). Use prompt.cancel() to decline. The API documentation describes page-originated device requests such as WebBluetooth requests; it does not require a particular hardware model.
How to wait for a Puppeteer device prompt and select a device
Register the prompt wait before the page action that causes the request. A wait started after the request is made will not return a prompt that is already active. Pairing the wait and click in Promise.all() lets the listener start alongside the triggering action.
As an Amazon Associate I earn from qualifying purchases.
- Call
page.waitForDevicePrompt()before clicking the page’s device-connect control. - Call
prompt.waitForDevice()with a predicate that identifies the intended entry. - Pass the returned entry to
prompt.select(device).
The following example follows the sequence in the Puppeteer API documentation. Replace the selector and device-name match with values from your page and test environment.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
const [devicePrompt] = await Promise.all([
page.waitForDevicePrompt(),
page.click('#connect-bluetooth'),
]);
const device = await devicePrompt.waitForDevice(({name}) =>
name.includes('My Device'),
);
await devicePrompt.select(device);
The example assumes page is an available Puppeteer page and that the page’s connect control requests a device. It is illustrative documentation guidance, not a report of an independently tested browser or hardware setup. See the DeviceRequestPrompt class reference for the prompt methods.
#1 Best Overall
How to choose the right entry from the prompt
prompt.devices is the current readonly list of selectable entries. You can inspect it when you need to understand what the prompt currently offers; use waitForDevice() when the desired entry may not be available immediately.
The predicate receives a DeviceRequestPromptDevice and returns a boolean. The class reference says the method resolves to the first matching device. Its optional wait-timeout options let you set a timeout policy; the documentation does not prescribe a universal matching rule or timeout.
Rank #2
Prefer a property that distinguishes the intended device in your application and test environment. The official example matches a name containing My Device; if names are not unique or stable in your setup, choose another available property suited to the page’s request. Avoid selecting an arbitrary first entry when the wrong device could affect the test.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11DeviceRequestPrompt methods at a glance
| API | Purpose |
|---|---|
page.waitForDevicePrompt(options?) |
Begin waiting for an upcoming device prompt; returns a promise for a DeviceRequestPrompt. Call before the page makes its request. |
prompt.devices |
Read the current list of selectable prompt entries. |
prompt.waitForDevice(filter, options?) |
Wait for the first entry that satisfies the predicate; accepts optional wait-timeout options. |
prompt.select(device) |
Select an entry from this prompt. |
prompt.cancel() |
Cancel the prompt instead of selecting an entry. |
For the documented class and method details, see DeviceRequestPrompt, waitForDevice(), and Page.waitForDevicePrompt(). The references reviewed for this article include class documentation version 25.12.0, a waitForDevice reference at 25.10.0, and the Next reference; align your code with the Puppeteer version installed in your project because API references can change.
How to cancel a device request
If the test should decline the request—for example, when no candidate matches your criteria—call cancel() on the prompt rather than selecting an unintended entry:
const [devicePrompt] = await Promise.all([
page.waitForDevicePrompt(),
page.click('#connect-bluetooth'),
]);
await devicePrompt.cancel();
Troubleshooting device prompt selection
The prompt wait never resolves
- Cause: The wait was started after the page had already requested a device, or the triggering action did not make a request.
- Fix: Start
waitForDevicePrompt()before the click or other triggering action, preferably alongside it withPromise.all(). Confirm that the page control actually initiates the device request.
No device matches the predicate
- Cause: The expected name or property does not match an entry offered by the prompt.
- Fix: Inspect
prompt.devicesto see the current selectable entries, then revise the predicate to match the intended device. Set an appropriate timeout through the optional wait-timeout options when waiting for a match.
The wrong device is selected
- Cause: The predicate is too broad, or the property used for matching is not distinctive in the test environment.
- Fix: Make the predicate specific to the intended entry using a suitable available property. Do not assume a name is unique unless your application or environment ensures it.
Hardware or browser behavior differs between environments
The API references explain the prompt workflow but do not prescribe a hardware model or establish behavior for every browser, operating system, or device setup. Treat hardware availability and the exact test environment as application-dependent, and verify the example against your installed Puppeteer version and target setup.
Rank #4
Or skip the browser setup
For website screenshots rather than device-prompt automation, ScreenshotNeo is a website screenshot API and MCP server. One GET request can return an image or PDF; it does not automate a Puppeteer device chooser. Cookie banners, popups and chat widgets are removed before the shot; bot checks, blank pages and failed loads are never billed; an MCP server lets AI agents take screenshots; and 1,000 screenshots a month are free with no card, with paid plans starting at $5 for 3,000.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Example cURL request (replace the target URL and supply your API key):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for request options. Sign up for 1,000 free screenshots a month, with no card required.
Best Value
- Used Book in Good Condition
Frequently Asked Questions
Does Puppeteer choose a device automatically?
No. The page exposes a device request prompt, and your code selects a matching prompt entry or cancels the request.
Does DeviceRequestPrompt require a specific Bluetooth device?
The API reference does not name a required hardware model. Requirements depend on the page and test environment.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




