Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Playwright with an authorized staging or demo site, synthetic account data, and explicit desktop and mobile browser settings. Capture the viewport to inspect a breakpoint, the full page to document a long layout, or a locator to review one component. Do not assume that a public banking login page authorizes automated access or testing.

Before capturing a banking page

Confirm the scope and authorization

Use a bank-owned or otherwise authorized test URL and confirm which pages and states you may capture. A public login page is not permission to access accounts or run automation against production. The target bank, URL, and approved scope are not specified here, so confirm them with the site owner.

Use synthetic data and protect screenshots

Prefer a staging or demo environment populated with synthetic account details. Avoid capturing real credentials, balances, transaction history, customer identifiers, or one-time passwords. If a page must be shown, mask sensitive fields or use a separate stylesheet to conceal them. Store captures in access-controlled test storage and avoid attaching unredacted images to tickets or logs; follow the bank’s applicable retention and access policies.

India’s RBI Master Direction on Digital Payment Security Controls addresses confidentiality safeguards for regulated entities and digital payment products and services; it is not a screenshot-specific workflow or a universal rule for every site. The RBI has also stated that banks should treat account-opening information as confidential. The Digital Personal Data Protection Act, 2023 describes lawful-purpose grounds and gives a bank website/app account-opening example, but commencement depends on government notification. Check current commencement and applicability rather than assuming every provision is in force based only on enactment. RBI Master Direction on Digital Payment Security Controls, Digital Personal Data Protection Act, 2023, RBI notification on customer confidentiality.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set up repeatable responsive captures

Playwright device descriptors provide representative device settings, including viewport, screen size, user agent, and touch capability; you can override the viewport where needed. A desktop viewport alongside a mobile profile lets you compare layouts without a physical phone. Keep route, browser engine, page state, screenshot scope, scale, and animation treatment consistent when comparing images. See Playwright emulation and Playwright screenshots.

The following TypeScript example uses Playwright Test. Replace the base URL, routes, device descriptor, and readiness locator with values for your authorized test environment. It writes screenshots to an artifacts directory, which must exist before the tests run.

import { test, devices } from '@playwright/test';

const baseURL = process.env.TEST_BASE_URL;
if (!baseURL) throw new Error('Set TEST_BASE_URL to an authorized test URL');

const routes = [
  { name: 'home', path: '/' },
  { name: 'login', path: '/login' },
];

test.describe('authorized responsive captures', () => {
  for (const route of routes) {
    test(`${route.name} desktop`, async ({ page }) => {
      await page.setViewportSize({ width: 1440, height: 900 });
      await page.goto(new URL(route.path, baseURL).toString());
      // Replace with the application's stable, non-sensitive readiness check.
      await page.locator('main').waitFor();
      await page.screenshot({
        path: `artifacts/${route.name}-desktop-1440x900.png`,
        animations: 'disabled',
        scale: 'css',
      });
    });
  }
});

test('authorized mobile view', async ({ browser }) => {
  const context = await browser.newContext({ ...devices['iPhone 13'] });
  const page = await context.newPage();
  await page.goto(new URL('/login', baseURL).toString());
  await page.locator('main').waitFor();
  await page.screenshot({
    path: 'artifacts/login-mobile-full.png',
    fullPage: true,
    animations: 'disabled',
    scale: 'css',
    mask: [page.locator('input[type="password"]')],
  });
  await context.close();
});

Install and run with the Playwright project commands appropriate to your project, for example npm init playwright@latest when starting a new project, then npx playwright test. Confirm that the selected descriptor exists in the installed Playwright version. The route paths, dimensions, device choice, and main selector are illustrative; they are not established properties of any particular bank site. Playwright documents screenshot scope, scale, animation handling, and masking in its Page screenshot API and Locator screenshot API.

Choose the screenshot scope and output

Need Playwright approach What it captures
Inspect a responsive breakpoint page.screenshot() at an explicit viewport The visible viewport at that browser size
Document a long page page.screenshot({ fullPage: true }) The full scrollable page
Review a component or form locator.screenshot() The matched element
Produce device-pixel output scale: 'device' Device-scale pixels, generally a larger image than CSS-scale output
Reduce motion-related variation animations: 'disabled' A capture with animations disabled for the screenshot operation
Conceal selected fields mask: [locator] The screenshot with selected element bounding boxes covered

Use scale: 'css' when compact, CSS-pixel-aligned output is more useful for review. For an isolated component, a locator screenshot avoids including unrelated page content. A mask covers selected elements’ bounding boxes; it is not a substitute for synthetic data or checking the resulting image. Full-page and viewport captures answer different questions, so use the one that matches the review.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make captures stable and easy to compare

Wait for meaningful readiness

Navigate through the authorized test flow with synthetic data, then wait for a meaningful application-specific condition and confirm the target content is visible. A generic selector such as main may only indicate that a container exists; choose a stable, non-sensitive selector that reflects the state you intend to record. An arbitrary fixed delay is less reliable than an app-specific readiness condition. No universal banking-site readiness selector is established.

Record the comparison conditions

Name artifacts with the route or state, viewport or device, browser project, and capture date. For example: account-summary-mobile-390x844-chromium.png. For a useful comparison, keep these consistent:

  • Viewport width and height, or the device profile.
  • Browser engine and Playwright project.
  • Route and UI state.
  • Viewport, full-page, or element capture scope.
  • Image scale and animation treatment.

These conditions help separate actual responsive changes from differences in how the screenshots were produced.

Troubleshoot common capture problems

The test cannot reach the site

Check that TEST_BASE_URL is set to the approved environment, the route resolves against it, and the test runner can reach that host. Do not switch to a live account or production flow as a workaround without explicit authorization.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The screenshot is blank or incomplete

Confirm that navigation completed and the target content—not merely a top-level container—is visible before capture. Replace a weak readiness locator with one tied to the intended page state. For lazy-loaded content, inspect the page at the chosen screenshot scope and ensure required content has loaded before taking a full-page capture.

The mobile image does not match the intended device

Verify the descriptor is present in the installed Playwright version and that the context uses it. A later viewport override can change the descriptor’s viewport, so check the final width and height as well as the other emulated settings.

Images vary between runs

Hold route, UI state, browser project, viewport, scope, and scale constant. Disable animations where appropriate and wait on a meaningful application condition. If the page depends on changing data, use a controlled synthetic state.

A screenshot exposes sensitive information

Stop distribution of the image and follow the site owner’s incident-handling and retention procedures. Prefer synthetic data; where needed, mask the relevant locators or conceal them with a separate stylesheet, then verify the resulting screenshot before sharing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

For an authorized public page, ScreenshotNeo can return a screenshot with one GET request. It removes cookie and consent banners, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers say which outcome occurred. Its MCP server provides screenshot tools for AI agents. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Do not use a screenshot service to access protected banking content or send sensitive account data.

See the ScreenshotNeo API documentation. Example using cURL:

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

The example URL is a public demonstration target; substitute only a URL you are authorized to capture. For controlled browser emulation, application-specific test flows, or sensitive test pages, use the Playwright workflow above. For a simpler authorized public-page capture, visit ScreenshotNeo and sign up for 1,000 free screenshots a month with no card.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.