Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallFor a page-triggered device request—such as a WebBluetooth chooser—start page.waitForDevicePrompt() before clicking the page control that opens it. Then wait for a matching device and select it. This is different from mobile-device emulation and HTTP request interception, which handle different tasks.
Handle a page-triggered device prompt
Puppeteer’s Page.waitForDevicePrompt() returns a DeviceRequestPrompt for a device request initiated by the page. The key timing requirement is to begin waiting before the page requests the device: the method does not return a prompt that is already active. Puppeteer describes this flow for APIs such as WebBluetooth. See the Page.waitForDevicePrompt() API reference.
As an Amazon Associate I earn from qualifying purchases.
Complete example
Start the prompt wait and the action that triggers the request together. The example uses a button selector and a device-name predicate; replace both with selectors and criteria appropriate to your test page.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →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 predicate identifies a candidate device in the prompt. A name is not necessarily unique, so use a criterion that distinguishes the intended device in your test environment. The example does not require a particular Bluetooth product.
#1 Best Overall
Sequence and timing
- Open the page and identify the page action that triggers its device request.
- Call
page.waitForDevicePrompt()before that action. Do not click first and start waiting afterward. - Run the wait and triggering action together, for example with
Promise.all(). - Call
devicePrompt.waitForDevice(predicate)to find the intended candidate. - Pass the returned device to
devicePrompt.select(device).
Choose the right Puppeteer API for “device”
“Device request” can refer to different browser automation tasks. Choose by the event you need to control, not by the word “device.”
| Task | Puppeteer API or object | When to set it up |
|---|---|---|
| Respond to a page-triggered chooser, such as a WebBluetooth request | Page.waitForDevicePrompt() and DeviceRequestPrompt |
Before triggering the page’s request |
| Use a mobile-style viewport and user agent | Page.emulate(device), or user-agent and viewport APIs |
Before navigation is generally preferable |
| Inspect or modify HTTP network requests | Page.setRequestInterception(true) and HTTPRequest |
Enable interception before the requests you want to handle |
Mobile-device emulation
Page.emulate(device) applies a Puppeteer device profile’s viewport metrics and user agent; it is a shortcut for setting those values. It emulates a software profile, not a physical phone or Bluetooth peripheral. Set the profile before navigation where possible: changing viewport dimensions can resize the page and may trigger a reload in some cases. See the Page.emulate() reference and device profiles reference.
Rank #2
HTTP request interception
Page.setRequestInterception(true) is for browser network requests, not device-selection prompts. When interception is enabled, requests stall until they are continued, aborted, or fulfilled, except requests completed using the browser cache. See the network interception guide and Page.setRequestInterception() reference.
If multiple handlers may resolve an intercepted request, guard against handling a request that another handler has already resolved. Puppeteer documents cooperative priority handling, but it only applies when all resolutions use priorities; a legacy resolution can take effect immediately. These rules concern HTTP interception and do not select a device from a browser prompt.
Troubleshoot device-prompt automation
- The wait never returns or the prompt is missed: Make sure
waitForDevicePrompt()starts before the click or other page action that requests a device. It will not return an already active prompt. - No candidate matches: Check that the page actually triggered a device request, then adjust the predicate to match the names or other identifying information available in your test environment. Avoid assuming a device name is globally unique.
- The code reports that the method is unavailable: Check the installed Puppeteer package and its API reference. The device-prompt method appears in the Next reference; do not assume it exists in every installed release. The documented version range surfaced for related device-profile, emulation, and interception pages includes Puppeteer 25.10.0–25.12.0, but that does not establish the device-prompt method’s availability in those releases.
- You are trying to change screen dimensions: Use device emulation or viewport APIs rather than
waitForDevicePrompt(). - You are trying to modify URLs, headers, or network behavior: Use HTTP request interception and ensure every intercepted request is resolved. It does not operate on a WebBluetooth chooser.
Or skip the browser setup
If your goal is a website screenshot rather than testing a browser device chooser, ScreenshotNeo returns an image or PDF from one GET request. It is a different task from selecting a WebBluetooth device through Puppeteer.
Quick Recap
Best Value
- Used Book in Good Condition
Rank #4
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 API options. It removes cookie banners, popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up for ScreenshotNeo free.
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.




