Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsPuppeteer can automate a browser-based WebRTC app and inspect what the app renders, but it does not create, relay, or record WebRTC media tracks. The app uses browser APIs such as getUserMedia() and RTCPeerConnection to capture and exchange media; Puppeteer acts as the test driver around that work. For Chrome UI and integration tests, you can supply a fake camera or a Y4M test file, drive the app, and assert visible outcomes.
Know which part Puppeteer controls
A WebRTC test involves several distinct layers. Keeping them separate prevents a common testing mistake: treating a screenshot or page recording as if it were the actual video stream.
- Media capture: The application requests camera or microphone media with
navigator.mediaDevices.getUserMedia(). It can request screen or window capture withgetDisplayMedia(). - Peer connectivity: The app adds local media tracks to an
RTCPeerConnection. The receiving peer gets tracks through that connection’strackevent. - Automation: Puppeteer launches and controls a browser page, clicks controls, and reads page state. It can check whether a video element is playing or whether the UI reports a connected call.
- Rendered-page capture: Puppeteer can record browser-page output using its experimental
Page.record()API. That is a recording of rendered page output, not an export of the underlying WebRTC tracks.
In short, use Puppeteer to test the user-visible behavior of your WebRTC app. Use the app’s media and peer-connection code to capture and exchange media. If you need a media-track artifact for analysis, collect it through an application or browser-media workflow designed for that purpose rather than assuming a page recording contains the original track data.
Choose the input that matches the test
| Input | Best fit | What to know |
|---|---|---|
| Chrome fake test pattern | Repeatable smoke tests that only need a camera-like source | Chrome documents --use-fake-device-for-media-stream for fake media input. It does not represent a particular real-world camera feed. |
| Y4M video file | Tests that need a deterministic, file-backed video source | Chrome’s documented --use-file-for-fake-video-capture=path/to/file.y4m flag supplies a Y4M test file to getUserMedia(). Keep the file path valid in the environment that launches Chrome. |
| Real camera and microphone | Hardware, device-selection, or end-to-end checks on a controlled machine | Device availability and permissions depend on the machine and browser context; results are less isolated than fake-input tests. |
| Display capture | Tests of screen-sharing flows | getDisplayMedia() is a separate browser capture API. Camera fake-device flags are not a general substitute for exercising screen-sharing behavior. |
The flags below are documented Chrome testing options, not a guarantee of identical behavior across browsers. Match the browser and Puppeteer versions used in your project, and verify flags against the Chrome version actually launched in CI.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Run a Chrome test with a fake camera
Install Puppeteer in a Node.js project with npm install puppeteer. The following driver demonstrates the browser setup and test structure. It assumes your application is reachable at APP_URL and exposes a “Start call” button, a remote video element, and a visible connection status. Change the selectors and expected status to match your app.
- Launch Chrome with fake media flags. Use the fake UI flag to avoid a media permission prompt in this Chrome testing workflow, and select either the generated test pattern or a Y4M file.
- Open your app over its normal test origin. Use a configured local or test URL. Browser permission behavior can vary with origin, context, and browser version.
- Drive the call through the product UI. Let the application request media and establish its peer connection as it does for a user.
- Assert page-visible results. Check the app’s connection indicator and whether the remote video element has data and is playing; a successful click alone does not establish that media arrived.
import puppeteer from 'puppeteer';
const appUrl = process.env.APP_URL;
if (!appUrl) throw new Error('Set APP_URL to your WebRTC test application URL');
const browser = await puppeteer.launch({
headless: true,
args: [
'--use-fake-ui-for-media-stream',
'--use-fake-device-for-media-stream',
// For a deterministic file-backed camera, replace the fake-device flag above
// with: '--use-file-for-fake-video-capture=/absolute/path/to/test.y4m'
]
});
try {
const page = await browser.newPage();
page.setDefaultTimeout(15000);
await page.goto(appUrl, { waitUntil: 'domcontentloaded' });
await page.locator('[data-testid="start-call"]').click();
await page.waitForFunction(() => {
const video = document.querySelector('[data-testid="remote-video"]');
return video instanceof HTMLVideoElement &&
video.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA &&
video.videoWidth > 0 && !video.paused;
});
const status = await page.locator('[data-testid="call-status"]').innerText();
if (status.trim().toLowerCase() !== 'connected') {
throw new Error(`Unexpected call status: ${status}`);
}
console.log('Remote video is rendering and the call UI reports connected.');
} finally {
await browser.close();
}
The assertion checks a rendered remote video element, not codec correctness, network quality, or the contents of a saved media file. For a stronger integration test, also inspect application-owned state or telemetry: for example, whether the local stream has the expected tracks, whether the peer connection reached the expected state, and whether the receiver handled a track event. Avoid depending on undocumented internal variables; expose a deliberate test hook or status element if the application needs deterministic assertions.
Connect the application’s media tracks correctly
Puppeteer should trigger the call flow; the application should own the WebRTC logic. A typical camera path obtains a local stream and adds its tracks to the peer connection. The receiving application handles the remote connection’s track event and attaches the received stream to a video element. The following is a structural example, not a complete signaling implementation:
const localStream = await navigator.mediaDevices.getUserMedia({
audio: true,
video: true
});
for (const track of localStream.getTracks()) {
peerConnection.addTrack(track, localStream);
}
peerConnection.ontrack = (event) => {
remoteVideo.srcObject = event.streams[0];
};
Two peers also need an exchange of session descriptions and, depending on the application and network, ICE candidates. That signaling path is application-specific. The Chrome fake-camera flags provide test media to capture APIs; they do not implement signaling, configure STUN or TURN, or establish a peer connection for you.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
For display sharing, test the user gesture and browser flow for getDisplayMedia() separately. Screen capture has different browser prompts and constraints from camera capture. Do not infer that a passing fake-camera test proves screen sharing works.
Permissions and browser contexts
Puppeteer documents origin-scoped permissions through BrowserContext.setPermission(), and browser contexts can isolate test state. Permission names, supported behavior, and interactions with browser capture prompts can vary by browser and release. Confirm the API in the documentation for your installed Puppeteer version and the behavior in the Chrome build used by the test.
Where the fake UI flag is appropriate, it can make the documented Chrome fake-media workflow avoid the media permission UI. It is not a universal permissions strategy for every browser or every capture type. When using a real device or a different browser, configure and verify permissions for the exact origin, context, and browser version rather than assuming a setting carries across them.
Can Puppeteer record a WebRTC video stream?
It can record what the browser page renders, but that is not the same as recording the underlying WebRTC media stream. Puppeteer’s current recording direction is Page.record(), documented as experimental and producing an MP4 page recording. Since it is experimental, check the API reference for the installed release and confirm compatibility before making it a test dependency.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Page.screencast() is marked obsolete in current Puppeteer documentation. Its documented output path involves WebM/VP9 and FFmpeg requirements. Do not start a new workflow around it without checking the current API guidance for your Puppeteer version.
A rendered-page recording is useful when you need evidence of what the user saw, such as a video element playing in the UI. It does not establish that you captured the original encoded packets or a clean, independently playable media track. If your test requires recording or inspecting tracks, build that into the application’s media pipeline or use an appropriate media capture mechanism, then test the page flow separately.
Do not use Puppeteer network emulation as a WebRTC impairment test
Puppeteer’s emulateNetworkConditions() documentation explicitly says it does not affect WebSockets or WebRTC PeerConnections. Therefore, a test that applies this setting cannot be presented as a reliable way to simulate packet loss, latency, or bandwidth constraints on a WebRTC connection.
For impairment testing, choose and verify a mechanism that affects the actual traffic path used by your test peers. That choice depends on where the peers run and how the application is deployed; the Puppeteer API does not prescribe a universal replacement. Keep UI/integration checks distinct from network-impairment or production-load testing, and verify that the chosen mechanism is acting on WebRTC traffic before interpreting results.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Recording page output with Puppeteer
If a browser-output artifact is useful, consult the Page.record() API documentation for the version in use. The API is experimental, so treat its availability and behavior as version-sensitive. Do not use a successful MP4 page recording as proof that the app’s peer connection, signaling, or original media-track recording is correct.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting common failures
- The browser shows a camera permission prompt or the request is denied. Confirm Chrome was launched with the intended fake-media flags, check that the test is using the expected browser binary, and verify the origin and permission behavior for that browser context. The fake UI flag is a Chrome testing option, not cross-browser policy.
getUserMedia()rejects or is unavailable. Confirm the test uses a supported secure context and that the page requested the intended media type. Check browser console errors and confirm the fake-device or Y4M option is valid for the launched Chrome version.- The local preview works, but the remote video is blank. A local capture result does not prove the peer connection completed. Check that the app adds local tracks, exchanges session descriptions and ICE candidates through its signaling path, handles the remote
trackevent, and attaches the received stream to the correct video element. - The Y4M workflow still produces no video. Verify the file exists at the absolute path visible to the Chrome process and is a supported Y4M input. Check Chrome startup output and page errors; do not assume a relative path resolves from the project directory.
- The test times out waiting for playback. Distinguish connection failure from playback policy or UI failure. Inspect the call status, video element’s
readyState,paused, and dimensions, plus application logs. A click can succeed while no remote frames arrive. - A network throttling test passes, but poor WebRTC conditions are not reproduced. Puppeteer documents that its network emulation does not affect WebRTC PeerConnections. Use a separately validated impairment method for the peer traffic.
- A Puppeteer recording API is missing or behaves differently. Check the documentation matching the installed Puppeteer release. The current
Page.record()direction is experimental, whilePage.screencast()is obsolete in current docs.
Performance, reliability, and cost of the test
Fake media is useful for repeatable browser-level coverage because the test does not depend on a physical webcam being available. A Y4M file can make the video input deterministic when the specific test content matters, but adds a test asset and a path that must exist in the browser’s execution environment. Neither approach validates real-device drivers or real network conditions.
For stable CI, isolate each run’s browser context, keep test selectors explicit, set timeouts based on the app’s actual connection flow, and capture console/page errors when assertions fail. Avoid using a fixed sleep as the only readiness check: wait for observable states such as the app’s connected indicator or remote video readiness. Run browser-version upgrades deliberately because Chrome flags, permission handling, and experimental Puppeteer APIs may change.
These checks validate a test scenario, not production capacity or reliability. Load testing, cross-region behavior, signaling availability, TURN relay behavior, and real-world network quality require coverage beyond a single automated page and are not established by a passing UI test.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server, not a WebRTC test runner or a recorder of WebRTC media tracks. If all you need is a rendered-page screenshot rather than an automated call test, one GET request can capture a URL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
See the ScreenshotNeo API documentation for request options. It removes cookie/consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots, and 1,000 screenshots per month are free with no card; paid plans start at $5 for 3,000. These are page screenshots, not proof of a functioning WebRTC connection. Learn about ScreenshotNeo, or sign up free for 1,000 screenshots a month with no card.
Frequently Asked Questions
Can Puppeteer test a WebRTC call without a real camera?
Yes. In Chrome, the documented fake-device workflow can supply a test pattern or a Y4M video file to the app’s camera capture request. It tests a browser flow with synthetic input, not physical camera hardware.
Does a successful screenshot prove that WebRTC media was received?
No. A screenshot shows rendered page output. To test media receipt, assert application and video-element state, and use media-specific instrumentation if you need to inspect tracks.
Does the fake Chrome camera flag provide screen sharing?
No. Screen capture uses the separate getDisplayMedia() API and needs its own test flow.
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.

