The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →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 Playwright’s page.screenshot() to save the page state you can access: omit options for the visible viewport, set fullPage: true for the full scrollable page, or call locator(selector).screenshot() for one element. The code below shows the capture; it does not guarantee that IRCTC’s live site will permit automated access or expose a particular form or selector.
Capture a page with Playwright
This Node.js example opens the IRCTC homepage and saves the current viewport as a PNG:
import { chromium } from 'playwright';
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('https://www.irctc.co.in/');
await page.screenshot({ path: 'railway-booking-page.png' });
await browser.close();
Install Playwright and its browser before running the script. In a new project, for example, run npm init -y, then npm install playwright and npx playwright install chromium. Save the example as an ES module, such as screenshot.mjs, then run node screenshot.mjs. The output file is written to the current working directory.
The example captures the page state reached after navigation; it does not sign in, submit a booking, or establish that the production site is available to unattended browser automation. If you need a page behind a login, use a session and access method you are authorized to use. Do not publish screenshots containing passenger names, OTPs, payment details, booking references, or other personal information.
#1 Best Overall
- 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
Choose viewport, full-page, or element capture
| Capture | Code | What it includes | Useful for |
|---|---|---|---|
| Viewport | await page.screenshot({ path: 'railway-booking-page.png' }); |
The current visible browser viewport | Showing what a user sees without scrolling |
| Full page | await page.screenshot({ path: 'railway-booking-page-full.png', fullPage: true }); |
The full scrollable page in a tall image | Documenting content below the fold |
| One element | await page.locator('YOUR_SELECTOR').screenshot({ path: 'booking-section.png' }); |
The selected element | Isolating a timetable or result card |
Playwright documents viewport and full-page screenshots, as well as locator screenshots, in its Screenshots guide. Replace YOUR_SELECTOR with a selector identified on the page you are testing; no current IRCTC booking-page selector is established here.
Make captures more repeatable
A live page may change between runs because of loading, animation, or changing content. For repeatable visual checks, Playwright Test’s toHaveScreenshot() assertion waits for two consecutive screenshots to match before comparing the capture with the expected image. Its documented options include animation handling, masking dynamic regions, and CSS/device scale. These controls can reduce avoidable differences, but cannot make a changing railway page deterministic.
Rank #2
- 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
See the Playwright PageAssertions documentation for screenshot assertion behavior and options. Use visual assertions when you are testing a controlled page state; for a one-off saved image, the regular page.screenshot() call is simpler.
Recommended Free Tools
What the IRCTC guide does—and does not—establish
The IRCTC International User Guide is a registration guide with dated examples, not documentation of the current layout or automation behavior of every production booking page. It warns: “This is testing website. PNR booked using this website is not authorized for journey.” Treat that warning as applying to the testing site described by the guide; do not use a test-site PNR for travel.
Rank #3
- 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.
The guide does not establish current production login steps, current page selectors, or whether automated navigation is allowed. Use Playwright only for a page state you are permitted to access, and do not assume a particular booking form will load in a script.
Troubleshoot common capture problems
- The script says it cannot find the Playwright package: Run
npm install playwrightin the project directory and verify that you run Node from that same project. - Chromium fails to launch: Install Playwright’s browser with
npx playwright install chromium. If your environment restricts browser execution, follow its administrator’s permitted setup rather than attempting to bypass those controls. - The screenshot is blank or the page has not finished loading: Check whether navigation completed and whether the page actually rendered in the browser. A successful call to
page.screenshot()does not prove that the requested site content loaded. - The selector locator times out or matches nothing: The selector may not exist in the current page state, may have changed, or may be behind a navigation or session step. Inspect the page you are authorized to access and choose a selector from that state; this guide does not supply a verified current IRCTC selector.
- The screenshot contains sensitive details: Do not publish it. Capture a permitted public or test state without real passenger, payment, OTP, or booking data.
Or skip the browser setup
ScreenshotNeo offers a one-request screenshot API and an MCP server for AI agents. Its capture options can accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before the screenshot; those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status.
For an authorized public page, save a WebP capture with cURL:
Rank #4
- 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
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://www.irctc.co.in/ -o railway-booking-page.webp
See the ScreenshotNeo API documentation for API use and parameters. The service also provides MCP tools named take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. Its free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card required.
Frequently Asked Questions
Can Playwright take a screenshot of a page that requires login?
It can capture a page state reached through an authorized session, but this guide does not establish IRCTC’s current login flow or automation rules.
Best Value
- 【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.
Does a Playwright full-page screenshot capture only the visible screen?
No. With fullPage: true, Playwright requests a capture of the full scrollable page.
Does the IRCTC international guide describe the current live booking page?
No. It is a registration guide with dated examples and does not establish current production layout or automation behavior.
Quick Recap
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.

