ScreenshotNeo

BlogAI agents

How to Screenshot an Indian Web App with an AI Agent Using a Mumbai Timezone

Configure an AI browser agent for Mumbai time, choose the right capture scope, and troubleshoot timezone, locale, and screenshot issues.

By the ScreenshotNeo team4 October 20267 min read

To screenshot an Indian web app as it appears for someone in Mumbai, configure the browser context with the IANA timezone Asia/Kolkata before navigating to the app. Set the browser locale separately—use en-IN if you want Indian English language and formatting behavior. Then have your AI agent open the relevant screen and capture the viewport, a selected element, or the full page.

This guide uses Playwright concepts and the Playwright MCP screenshot workflow. Browser timezone emulation applies to the browser context; it does not set the timezone of your test runner or change timestamps created by your server. Check your app’s own settings and data sources when those affect what appears on screen.

1. Configure Mumbai timezone and Indian locale

Use Asia/Kolkata, not a manually guessed UTC offset. Timezone identifiers use location-based rules that can reflect changes to local time rules. Locale and timezone are independent: en-IN controls browser locale behavior, while Asia/Kolkata controls the browser context’s timezone.

Create the context before opening the page so the app observes the intended settings as it loads:

const context = await browser.newContext({
  locale: 'en-IN',
  timezoneId: 'Asia/Kolkata',
});
const page = await context.newPage();
await page.goto('https://your-app.example');
await page.screenshot({ path: 'mumbai-app.png', fullPage: true });

This is an illustrative Playwright workflow, not a report that the script was executed against a particular app. Playwright documents locale and timezone as browser emulation options, configurable for a browser context or an individual test. See Playwright emulation and the IANA time zone database.

2. Choose what the agent should capture

Decide the capture scope based on the evidence you need:

Scope Use it for Playwright option
Viewport A quick look at the current visible state Omit fullPage and element target
One element A focused component such as a dialog, form, or chart Use an element target in the MCP screenshot tool, or an element locator’s screenshot method in Playwright code
Full page Documentation or review of the full scrollable page fullPage: true

In the Playwright MCP screenshot tool, fullPage: true cannot be combined with an element target. Choose one scope per capture. The tool supports PNG, JPEG, and WebP output; it can infer the format from the filename extension and defaults to PNG when it cannot infer one. Consult the Playwright screenshot documentation for current screenshot options.

3. Use an AI agent with Playwright MCP

Start a Playwright MCP session in your chosen client, then give the agent a task that names the page, expected state, timezone, locale, and capture scope. For example:

Open https://your-app.example/reports in a browser context configured with
locale en-IN and timezone Asia/Kolkata. Wait until the report is visible,
then capture a full-page PNG named mumbai-report.png. If the report has a
loading state, wait for the report content before capturing.

Use the agent’s browser setup or configuration to create the context with the settings in section 1. The exact setup command depends on the MCP client and project configuration; the screenshot action itself supports choosing an element target, full-page capture, filename, and image type.

For reliable interaction, ask the agent to inspect the page structure with an accessibility or browser snapshot, then use the screenshot to review visual appearance. A screenshot is visual evidence; it is not an interaction map. Playwright’s MCP guide advises using browser_snapshot to get references for interaction and screenshots for looking at the result. See Playwright’s agent documentation.

4. Set the test runner timezone separately when needed

Browser emulation changes the browser context’s timezone. If test code running in Node.js also needs to interpret dates in Mumbai time, configure the runner environment independently. For example, on systems that support the TZ environment variable:

TZ=Asia/Kolkata npx playwright test

Use this only when runner-side date behavior matters. It does not replace setting timezoneId on the browser context. Likewise, neither setting proves that server-generated timestamps use Mumbai time; the application’s server, account preferences, and date-rendering code may be the source of the displayed value.

5. Capture with Playwright code, cURL, Python, or Node.js

For an AI agent, use the Playwright MCP flow above. For a scripted browser capture, configure the context first, navigate, wait for the state that matters, and save the file. The following example shows the context and page setup; it assumes your project already has a Playwright browser instance available as browser:

const context = await browser.newContext({
  locale: 'en-IN',
  timezoneId: 'Asia/Kolkata',
});
const page = await context.newPage();
await page.goto('https://your-app.example/reports', { waitUntil: 'domcontentloaded' });
await page.getByRole('heading', { name: 'Reports' }).waitFor();
await page.screenshot({ path: 'mumbai-report.png', fullPage: true });
await context.close();

Replace the example URL and heading with elements from your app. The heading wait is only an example of an app-specific readiness condition; use a selector or state that indicates the content you need is actually ready.

For a one-request screenshot without managing a browser, ScreenshotNeo accepts a URL and returns an image or PDF. Its screenshot API does not document timezone emulation in the facts available for this guide, so use the Playwright context approach when Mumbai browser timezone behavior is essential.

API documentation: ScreenshotNeo docs.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" \
  -d access_key=YOUR_API_KEY \
  --data-urlencode url=https://your-app.example/reports \
  -o report.webp

Python

import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={
        "access_key": "YOUR_API_KEY",
        "url": "https://your-app.example/reports",
    },
    timeout=90,
)
open("report.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({
  access_key: 'YOUR_API_KEY',
  url: 'https://your-app.example/reports',
});
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(({ writeFile }) =>
  writeFile('report.webp', Buffer.from(await res.arrayBuffer()))
);

6. Validate what the screenshot proves

  • Confirm the context was created with timezoneId: 'Asia/Kolkata' before the app loaded.
  • Check locale separately. Use en-IN only when Indian English language and formatting are wanted.
  • Wait for the app-specific content or state that should appear in the capture.
  • Choose viewport, element, or full page deliberately. Do not combine full-page and element targeting in the MCP screenshot tool.
  • Inspect timestamps against the app’s source of truth. Browser emulation does not alter server-side logic.
  • Use a browser snapshot or accessibility view to identify and interact with page elements; use the screenshot to assess visual layout.

7. Troubleshooting

Symptom Likely cause Fix
The page still shows the wrong local time The browser context was created without the timezone, or the displayed value comes from the server or account settings. Set timezoneId: 'Asia/Kolkata' before navigation. Check server-side formatting and user preferences separately.
The browser looks Indian but time is unchanged Locale and timezone are separate settings. Set both locale: 'en-IN' and timezoneId: 'Asia/Kolkata' if both behaviors are needed.
Test logs use a different timezone than the page Browser emulation does not set the test runner timezone. Configure the runner environment separately, for example with TZ=Asia/Kolkata where supported.
The screenshot is blank or shows a loading state The capture happened before the relevant app content was ready, or the page failed to load. Wait for an app-specific selector or state before capture; inspect navigation and load errors.
The MCP capture fails when targeting an element and the full page The tool does not allow fullPage: true together with an element target. Capture the element and full page as separate screenshots.
The image format is unexpected The filename extension was missing or did not identify the intended type. Use a clear extension such as .png, .jpg, or .webp, and check the tool’s output type options.
An agent clicks the wrong control after seeing a screenshot A screenshot shows appearance but not stable interaction references. Ask the agent to inspect the browser or accessibility snapshot and use its element references for interaction.

8. Performance, reliability, and cost

Full-page captures cover more content than viewport captures, so use them when the extra page area is useful. Element captures help focus review on a component. Wait for the specific state you need rather than relying on an arbitrary delay where a meaningful selector is available. Keep timezone data in the browser environment current when exact date conversion matters, because timezone rules can be updated.

For repeatable evidence, record the URL, locale, timezone, capture scope, and readiness condition alongside the screenshot. A browser timezone only controls browser-side behavior; verify server-generated dates and account-specific settings independently.

ScreenshotNeo offers 1,000 screenshots per month free with no card. Paid plans start at $5 for 3,000 screenshots; other listed plans are Growth at $15 for 15,000, Pro at $39 for 60,000, Scale at $99 for 250,000, and Business at $249 for 1,000,000. Yearly billing gives two months free, and every feature is available on every plan. Only clean shots are billed; bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing. Responses include X-Page-Verdict and X-Billed headers so you can see the result and billing status. See ScreenshotNeo for product details.

Or skip the browser setup

Make a single GET request for a screenshot. This is useful when you need a capture quickly; use the Playwright workflow above when the browser must emulate Mumbai timezone.

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

ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before the shot. Bot checks, blank pages, and failed loads are never billed. An MCP server lets AI agents use take_screenshot, get_page_info, and capture_pdf. You get 1,000 screenshots a month free with no card; paid plans start at $5 for 3,000. These captures do not set a Mumbai browser timezone.

Sign up for 1,000 free screenshots a month, with no card.

FAQ

Is Mumbai’s timezone called Asia/Mumbai?

No. Use the IANA identifier Asia/Kolkata for Mumbai.

Does setting en-IN set the timezone?

No. Locale and timezone are separate browser settings. Configure both when the page needs both behaviors.

Will timezone emulation change dates generated by my backend?

Not by itself. Check where the application generates and formats the timestamp.

Can I capture a full page and a single element in one MCP screenshot?

No. The documented MCP screenshot tool does not combine its full-page option with an element target. Run separate captures.