How to take screenshots of a localhost website with LambdaTest
Use a secure tunnel to open your localhost site in TestMu AI (formerly LambdaTest), then capture it across browser and device configurations.
To take a screenshot of a localhost website with LambdaTest, first start your local web server, then connect your machine to the cloud browser with the vendor’s tunnel and open the site through the tunnel’s documented local address. LambdaTest is now TestMu AI; older UI guides may still use LambdaTest terminology. A cloud browser cannot ordinarily reach your machine’s private localhost directly. The tunnel provides that connection. [Official local testing documentation]
This guide covers the tunnel setup, browser and viewport selection, screenshot workflow, security, common failures, and an API alternative when you only need a screenshot of a publicly reachable page.
1. Start and check your local site
- Run your application’s development server using its usual command.
- Open the local URL in a browser on the same computer that will run the tunnel. Confirm the page loads and any needed data is present.
- Note the protocol, hostname, and port. For example, a development server may use HTTP and a framework-specific port. There is no single universal port or hostname mapping for the remote browser; follow the tunnel instructions in your account.
If the site does not load locally, fix that first. The tunnel carries requests to the local machine; it does not start the web server or repair application errors.
2. Choose how to start the tunnel
TestMu AI documents two practical setup paths:
| Method | Choose it when | Considerations |
|---|---|---|
| Platform-specific tunnel binary | You are comfortable with a terminal or want to include tunnel startup in a repeatable workflow. | Download the binary for your operating system and architecture, then use the current instructions to authenticate and start it. |
| UnderPass graphical app | You prefer a desktop setup without terminal commands. | The vendor describes UnderPass as a graphical way to establish the tunnel. Follow its current setup instructions. |
The product page also lists an npm plugin and GitHub Actions integrations for local testing. Those are options to investigate when automating a project workflow; available steps and account entitlements can change. [TestMu AI local page testing]
Published tunnel requirements and connection modes
The official documentation lists binaries for Windows, Linux, macOS, FreeBSD, and Solaris architectures. Published minimum requirements include a supported operating system, x86_64 or ARM64, one physical CPU core, 2 GB RAM, 200 MB disk space, permission to execute the binary, and outbound access to the vendor over port 443. Treat these as the vendor’s stated requirements, not as independent performance measurements.
The documentation describes TCP with TLS 1.2 over port 443 and WebSocket over port 443. The binary scans the network and chooses a mode unless one is explicitly configured. If a corporate firewall or proxy blocks one mode, check the current tunnel troubleshooting instructions and network policy for the supported alternative.
3. Keep tunnel credentials private
Access keys and API tokens are private credentials. Do not place real credentials in public source code, repositories, screenshots, or exposed environments. Use the vendor’s recommended secret handling for automation. If a credential is exposed, revoke it and generate a replacement. [Credential guidance in the official docs]
4. Open the local site in a cloud browser
- Sign in to your current TestMu AI account and choose the local testing or screenshot workflow that fits the task. Product labels and layout can change, so use current account instructions rather than relying on a historical button location.
- Start the tunnel using the binary or UnderPass, following the current instructions for authentication and any port mapping.
- In the cloud session, enter the local address using the hostname and port recognized by that tunnel configuration. Do not assume that typing
localhoston a remote machine automatically means your development computer. Use the alias or mapped address specified by the vendor’s tunnel instructions. - Wait for the page to finish loading, then capture the screenshot using the selected browser/device workflow.
For responsive checks, select the target device or viewport combinations that matter to your users. The vendor’s screenshot-testing article distinguishes desktop resolution selection from mobile responsive testing; verify current workflow details in the product. [TestMu AI screenshot testing overview]
5. Choose a screenshot workflow
One-off inspection
Use a manual browser session when you need to inspect one page or reproduce a visual issue. Record the browser and viewport so another capture can be compared under the same conditions.
Repeated browser or device checks
For recurring checks, use the product’s screenshot-testing workflow to select the browser/device configurations you need. Save or share results only where the current account workflow supports it. The vendor’s blog describes result sharing, saved configurations, and screenshots of pages behind login, but those details may vary with current UI and plan packaging.
Pages behind login
Authenticate in the cloud session using a safe test account and the supported workflow. Avoid putting real user credentials into a shared test configuration or public repository. Check the current product guidance for handling authenticated pages and session state.
6. Diagnose common problems
| Symptom | Likely cause | What to do |
|---|---|---|
| The cloud browser cannot open the page | The tunnel is not running, the local server is stopped, or the remote URL does not use the tunnel’s expected hostname or port. | Confirm the site loads locally, keep the server and tunnel running, and use the exact address and port mapping in current tunnel instructions. |
| The page loads locally but not through the tunnel | The server may listen only on an interface the tunnel cannot reach, or the application may reject the tunnel hostname. | Check the framework’s bind-address configuration and host allowlist. Use the tunnel’s documented mapping; do not expose the development server publicly as a shortcut. |
| The tunnel cannot connect | Outbound port 443 may be filtered, a proxy may interfere, or the selected connection mode may not work on the network. | Check outbound network access and the vendor’s current connectivity guidance for TCP/TLS and WebSocket modes. Ask the network administrator about permitted egress if needed. |
| The tunnel binary will not start | Wrong operating system or architecture, missing execute permission, or unmet system requirements. | Download the matching binary, grant execute permission where applicable, and compare the machine with the published requirements. |
| The screenshot is blank or incomplete | The application may still be loading, data requests may fail, or the page may render differently in the selected browser. | Open the same route in that cloud browser, inspect application/network errors, and wait for the app’s required data and assets before capturing. |
| A logged-in route redirects to sign-in | The cloud browser session lacks the required authentication or session state. | Authenticate through the supported workflow with a test account and ensure the session remains active for the capture. |
| The page works on desktop but not on a mobile configuration | The responsive layout or mobile-specific application path may fail at that viewport or device. | Reproduce at the same viewport, test responsive behavior, and distinguish a layout issue from a device-specific runtime issue. |
| A credential may have been exposed | An access key or API token entered a public or shared location. | Revoke and regenerate the credential, then remove the exposed copy and update authorized automation secrets. |
7. Reliability, performance, and cost considerations
A local capture depends on three things staying available during the session: the development server, the tunnel process, and the cloud browser workflow. Keep the server and tunnel open until the capture finishes. For repeatable comparisons, use the same route, browser/device configuration, viewport, login state, and application data.
The tunnel adds a network path between the cloud browser and your machine, so load time can depend on local server response, assets, and network conditions. Large pages and slow external dependencies can make screenshots inconsistent. Stabilize test data and wait for the application state you intend to inspect.
Check current TestMu AI account terms for pricing, usage limits, retention, and feature availability. The supplied official sources do not establish reliable current plan limits or prices, so this guide does not quote them.
Or skip the browser setup
If the target is publicly reachable, ScreenshotNeo can return a screenshot with one GET request. It is a screenshot API and MCP server from Yorker Media. See the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, with the result stated in X-Page-Verdict and X-Billed headers. Its MCP server gives AI agents tools for screenshots, page info, and PDF capture. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.
Get 1,000 screenshots a month free, with no card required.
FAQ
Can a remote browser use my computer’s localhost directly?
No. Use the tunnel so the cloud browser has a route to the local machine, and follow the configured hostname and port mapping.
Do I need to make my development server public?
The documented tunnel workflow connects your local machine to the cloud service. Follow its setup instructions instead of publishing a private development server to the open internet.
Is LambdaTest still the product name?
The vendor says LambdaTest is now TestMu AI. Older documentation and interface walkthroughs may retain LambdaTest naming.
Can I use ScreenshotNeo to capture a private localhost URL?
The example above is for a publicly reachable URL. A cloud screenshot API cannot reach a private localhost address unless a supported connection path is provided; use the local tunnel workflow for a site that is only available on your machine.


