What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Use Selenium to launch Chrome in Headless mode, set an intentional viewport, wait for the page and its fonts, then save the current browser window as a PNG. The file saving successfully does not prove Hindi rendered correctly: inspect the image for missing Devanagari glyphs, clipped marks, or unexpected font changes. The example below uses Python; replace its sample URL with the government page you are permitted to capture.

Capture a page with Selenium and headless Chrome

Selenium’s ordinary screenshot method captures the browser’s current window, not automatically the entire document. Choose a viewport large enough for the portion you need, and wait for the page-specific content before saving. Chrome’s current Headless mode uses the same browser implementation as headful Chrome. Chrome’s Headless documentation shows the Selenium setup pattern.

Python example

Install Selenium in your environment and make Chrome available. Selenium’s current Chrome setup can manage a matching driver in supported configurations; otherwise install or configure ChromeDriver for the Chrome binary. Keep Chrome and ChromeDriver on matching major versions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
from pathlib import Path
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait

url = "https://example.gov.in/"  # Replace with the permitted target page
output = Path("screenshot.png").resolve()

options = webdriver.ChromeOptions()
options.add_argument("--headless")
options.add_argument("--window-size=1365,1200")

driver = webdriver.Chrome(options=options)
try:
    driver.get(url)
    WebDriverWait(driver, 30).until(
        lambda d: d.execute_script("return document.readyState") == "complete"
    )
    # Wait for fonts where the browser exposes the Font Loading API.
    driver.execute_async_script("""
        const done = arguments[0];
        if (document.fonts && document.fonts.ready) {
          document.fonts.ready.then(() => done());
        } else {
          done();
        }
    """)
    ok = driver.save_screenshot(str(output))
    if not ok:
        raise RuntimeError(f"Could not save screenshot to {output}")
    print(f"Saved {output}")
finally:
    driver.quit()

The 30-second wait is a starting limit for the document-ready condition, not a guarantee that every dynamically rendered widget or image has finished. Add a wait for a meaningful page landmark, such as a heading or table, when the site populates content after initial navigation. Selenium documents save_screenshot() as saving the current window to PNG and returning false if writing fails: Python WebDriver API.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Check versions and record the environment

Selenium’s Chrome-specific documentation says Selenium 4 is compatible with Chrome 75 and greater, and Chrome and ChromeDriver major versions must match. Record the Chrome and driver versions, operating-system or container image, installed fonts, viewport, device scale factor if controlled, and target URL so a capture can be reproduced. See Selenium’s Chrome guidance.

Chrome’s Headless mode was updated in Chrome 112. Since Chrome 132, the old Headless implementation is available only as a separate chrome-headless-shell binary; older instructions that assume the former implementation may not describe the Chrome binary you are running. See Chrome Headless mode.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Make sure Hindi text renders correctly

A screenshot is a bitmap of what Chrome rendered. On Linux containers and minimal CI images, verify that the environment has an installed or bundled font with Devanagari coverage. There is no single font package established here as a universal fix for every Hindi government page or deployment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Open the saved PNG and look for missing-glyph squares, detached or clipped vowel marks, unexpected fallback fonts, and text wrapping or layout shifts.
  • Wait for web fonts before capture; document.fonts.ready is a useful starting point, but page-specific scripts can still change content afterward.
  • If the output is wrong, compare the same page in headful Chrome on a known-good environment. Check its installed fonts, browser and driver versions, and viewport against the headless environment.
  • Inspect the page at the actual target size: different glyph metrics can alter line breaks, clipping, and element placement.

Capture the full page or use Chrome’s command line

Full-document images

driver.save_screenshot() captures the current window. Increasing the window height can expose more content, but it does not establish that every page will produce a correct full-document capture; lazy-loaded elements and page-specific layout behavior can complicate it. Use a browser-specific full-page technique that you have verified with the target page, or capture sections and stitch them, then inspect the resulting image. Chrome’s Headless Chrome shell documentation also notes that full-page screenshots require extra work.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

One-off Chrome CLI capture

For a static page that does not need interaction or Selenium’s page-specific waits, Chrome’s command-line screenshot is a simpler option. The CLI supports a window size and a timeout:

chrome --headless --window-size=1365,1200 --timeout=5000 --screenshot=screenshot.png https://example.gov.in/

Replace chrome with the executable name or path used by your system. The timeout controls when Chrome takes the screenshot; it is not proof that a particular page’s content or fonts are ready. The Chrome Headless command-line reference documents --screenshot, --window-size, and --timeout. It states: “The --screenshot flag takes a screenshot of the target page and saves it as screenshot.png in the current working directory.”

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

Use Selenium when a capture must interact with a page, wait for a particular condition, or fit into an existing test suite. Use the CLI for a quick static capture where a fixed viewport and timeout are sufficient.

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

Or skip the browser setup

ScreenshotNeo offers a one-request screenshot API and an MCP server for AI agents. Its cleanup steps can accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP tools include take_screenshot, get_page_info, and capture_pdf. These features do not remove the need to check that the resulting image displays Hindi correctly.

For example, this cURL request saves a WebP screenshot of the target URL. See the ScreenshotNeo documentation for request options.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.gov.in/ -o shot.webp

ScreenshotNeo has a free plan with 1,000 shots per month and no card required; paid plans start at $5 for 3,000 shots. Sign up for the free plan.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common failures

Symptom Likely cause What to check or change
Chrome will not start or the session fails to create Chrome and ChromeDriver major versions do not match, the binary is unavailable, or the environment cannot launch it. Check the installed browser and driver versions and confirm Chrome can start in the same host or container. Selenium’s Chrome guide covers browser and driver setup.
PNG is absent or screenshot returns false The output path is not writable, or an I/O error occurred. Use an absolute path in a writable directory and check the return value of save_screenshot().
Hindi characters appear as squares or marks are clipped The environment may lack a font with Devanagari coverage, fonts may not have loaded, or the page’s layout differs in that environment. Inspect installed or bundled fonts, wait for fonts, compare with headful Chrome, and inspect the saved PNG rather than treating a successful file write as a rendering check.
Screenshot is blank, incomplete, or missing dynamic content Navigation completion may precede application rendering, or a page element loads asynchronously. Wait for a page-specific landmark or condition; a general document-ready check or CLI timeout alone cannot confirm application readiness.
Bottom of the page is missing The Selenium method captured only the current window. Use a verified full-page technique or capture and stitch sections; changing the window height alone is not a universal full-page solution.

Respect the site’s access rules

Before repeatedly capturing a government site, check its terms and service-specific constraints, particularly for authenticated or high-volume access. The Government of India’s Guidelines for Indian Government Websites and Apps portal provides GIGW manuals, validation resources, and accessibility guidance. Those resources do not determine whether a particular site permits automated access.

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

Frequently Asked Questions

Does a successful Selenium screenshot mean the Hindi text is correct?

No. It confirms that a PNG was written, not that the browser rendered every Devanagari glyph correctly. Inspect the saved image.

Does Selenium’s standard screenshot method capture the whole page?

No. It captures the current browser window; full-document capture requires a separately verified technique or stitched sections.

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.