ScreenshotNeo

BlogHow-to

How to capture screenshots of a website behind a login with LambdaTest

Set up a LambdaTest login profile, capture a page after sign-in, and troubleshoot common failures. See when an API screenshot can and cannot work.

By the ScreenshotNeo team4 October 20267 min read

To capture a page behind a login with LambdaTest, create a saved login profile with the login page URL, form locators, and authorized credentials. Then enable that profile in Screenshot Testing and enter the separate URL of the page you want to capture. The login URL tells the browser where to sign in; the screenshot URL tells it what to capture after sign-in.

The current official product pages use the TestMu AI name. The documented workflow below refers to Screenshot Testing and the saved login profile feature described in the [official guide](https://www.testmuai.com/support/docs/taking-screenshots-of-pages-behind-login/).

Set up a LambdaTest login profile

  1. Sign in to your TestMu AI/LambdaTest account and open Screenshot Testing under Visual UI Testing.
  2. Create a new login profile. For its URL, enter the website’s sign-in page, such as https://example.com/login. Do not enter the protected page here.
  3. Open the login page in a browser and inspect its form with developer tools. Identify the username or email field, password field, and submit control.
  4. Choose a locator for each control and enter authorized test credentials. Save the profile with a recognizable name.
  5. In Screenshot Testing, enable the saved profile, then enter the URL of the page to capture, such as https://example.com/account/reports.
  6. Run one session and inspect the result. Once sign-in and rendering work, run the browser or device configurations you need.

Choose locators that match one control

The support guide lists these locator types: ID, Name, TagName, CSS Selector, XPath, Class Name, Link Text, and Partial Link Text. Prefer a stable ID or name when the page provides one. Otherwise use a CSS selector or XPath that uniquely identifies the intended field or button. A class can be shared across several elements; if a class selector is ambiguous, select a more specific locator or use an XPath that targets the correct control.

There is no universal selector set because each website’s form markup differs. Inspect the actual login form rather than copying selectors from another site. If the login form changes, update the profile locators.

Understand the capture sequence

The documented process is: open the login URL, find and fill the specified username and password fields, activate the submit control, wait for the next page to render, then navigate the screenshot driver to the target test URL. This distinction matters:

Profile or run field What to enter
Login profile URL The page containing the sign-in form
Username and password locators Unique selectors for the corresponding form controls
Submit locator A selector that identifies the intended submit control
Screenshot test URL The protected destination page to capture after sign-in

After the form is submitted, the destination needs time to render before the capture. Start with a single session so you can determine whether the login profile reaches the expected authenticated state before requesting multiple configurations.

Run a first capture and scale carefully

  1. Choose one protected URL and one browser/device configuration.
  2. Start the screenshot run with the login profile enabled.
  3. Check that the result shows authenticated content, not the login page, an access-denied page, or an empty state.
  4. If it works, add the other browser/device configurations and URLs required for your task.

The official support article describes full-page screenshots and states that a test session supports up to 25 screenshots. Treat that as the documented figure, not a permanent limit: check the current product documentation for the applicable session limit before planning a larger batch.

Authentication edge cases

  • Multi-factor authentication (MFA): The cited guide does not establish support for every MFA flow. Test your exact sign-in process and consult current product documentation or support if the flow cannot complete.
  • CAPTCHA or bot checks: The cited sources do not promise that these can be completed. Do not assume a profile will bypass them; check the current service guidance.
  • Single sign-on (SSO): SSO can involve redirects and identity-provider steps beyond a basic username/password form. Confirm your specific flow with current documentation or support.
  • Session expiration or rotating challenges: A saved profile may need updated credentials or selectors when the website’s sign-in behavior changes. Re-run one session to verify the current flow.
  • Client-side navigation: If submitting the form changes the page through JavaScript, verify that the authenticated destination is ready before the screenshot run proceeds. The cited guide does not give a universal wait setting for every application.
  • Local or private development site: The vendor blog describes using a testing tunnel for local sites. Tunnel setup can change, so follow the current official documentation for connection steps.

Troubleshooting

Symptom Likely cause What to check
Login step fails A locator no longer matches the live form or matches the wrong control. Inspect the current page markup, verify each locator, and make sure the submit selector is unique.
Screenshot shows the login page The profile was not enabled, sign-in did not complete, or the capture URL is wrong. Enable the saved profile, verify the login URL and locators, and enter the protected destination separately as the screenshot URL.
Screenshot shows an incomplete destination The destination had not finished rendering after form submission. Run a single session and check the post-login sequence and page rendering. Follow current product guidance for the site’s navigation behavior.
Capture reaches an unexpected page The form may have redirected through an identity provider, error page, or challenge. Verify the actual authenticated path in a session and consult current support guidance for the specific flow.
Local site cannot be reached The remote test browser may not have a route to the development machine. Check the current tunnel documentation and confirm the tunnel is connected before running the capture.
Only some requested screenshots are returned The request may exceed the current per-session screenshot limit. Check the current limit in official documentation and split the work into supported sessions if needed.

Credentials, reliability, and cost planning

Use credentials that are authorized for automated testing, and consider using a dedicated test account with access limited to the pages under test. The cited sources say that a login profile is retained in the account for later runs; they do not specify credential encryption, retention duration, or access controls. Check current account and security documentation before storing sensitive credentials.

For reliability, verify the profile with one session after changes to the sign-in form, password, access policy, or destination. A saved profile avoids rebuilding the same configuration for each run, but it cannot make a changing or challenged login flow stable. When a capture is part of a release check, inspect the output instead of treating a completed job as proof that the intended authenticated page was captured.

The supplied research does not state LambdaTest screenshot pricing or per-run charges, so this guide makes no cost estimate. Check the current account plan and pricing before scheduling repeated multi-configuration runs.

Or skip the browser setup

For pages that are publicly reachable, ScreenshotNeo can return a screenshot or PDF with one GET request. It is a website screenshot API and MCP server; its parameter names also work with names used by other screenshot APIs, which can make switching easier. This does not replace a login profile for a page that requires an authenticated browser session: use it only when the target can be reached by the API without that sign-in flow.

See the ScreenshotNeo API documentation for request options. Example with cURL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python:

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)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await import('node:fs/promises').then(fs => fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer())));
  • Cookie banners are accepted and removed, along with known newsletter popups and chat widgets, before the shot; each step can be turned off.
  • Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed. Response headers report the page verdict and billing status.
  • An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.
  • The free plan includes 1,000 screenshots each month with no card. Paid plans start at $5 for 3,000 screenshots.

Sign up for ScreenshotNeo free: 1,000 screenshots a month, no card required.

FAQ

Can the login URL and screenshot URL be the same?

They serve different purposes: the profile URL opens the sign-in form, while the test URL names the page to capture after authentication. Use separate URLs when the protected page is different from the login page.

Can I reuse a saved login profile?

Yes. The vendor guide says profiles are saved in the account for later runs. Recheck the profile when credentials or the form change.

Does the documented 25-screenshot limit always apply?

The cited support article states up to 25 screenshots in a session. Confirm the current limit in the live documentation because product limits can change.

Can ScreenshotNeo capture a page that requires signing in?

This guide’s ScreenshotNeo example is for a publicly reachable URL. The provided product facts do not describe authenticated-session capture, so use LambdaTest’s login-profile workflow for the protected-page task and consult ScreenshotNeo documentation for supported request authentication options.