Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk3 min

Playwright में Indian E-commerce Page का पूरा Product Grid Screenshot कैसे लें

जानें कब fullPage screenshot लें और कब grid locator का, lazy-loaded products को capture से पहले कैसे render करें और आम screenshot समस्याएँ कैसे ठीक करें।
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

अगर पूरे listing page की लंबी इमेज चाहिए, तो Playwright में page.screenshot({ path: 'product-grid.png', fullPage: true }) इस्तेमाल करें। अगर header, filters और footer हटाकर केवल products चाहिए, तो grid locator का screenshot लें। दोनों में अहम बात यह है कि lazy-loaded आखिरी rows capture से पहले सचमुच render हो चुकी हों—fullPage: true अपने-आप अगली products load नहीं करता।

पहले तय करें: पूरा page या केवल product grid?

तरीका क्या capture होगा कब चुनें
page.screenshot({ fullPage: true }) पूरे scrollable document की लंबाई, जिसमें header, filters और footer भी आ सकते हैं। जब पूरी listing page का रिकॉर्ड चाहिए।
locator.screenshot() चुने गए grid element का crop। Scrollable grid के मामले में सामान्यतः उसका मौजूदा visible हिस्सा। जब केवल product cards चाहिए और grid का अपना scrollbar न हो।
expect(page).toHaveScreenshot() स्थिर page screenshot की visual comparison। जब Playwright Test runner में visual regression test लिख रहे हों।

Playwright का आधिकारिक Screenshots guide full-page capture को पूरे scrollable page के रूप में और element capture को अलग तरीके से बताता है। API में fullPage का default false है।

As an Amazon Associate I earn from qualifying purchases.

पूरी listing page का screenshot लें

यह runnable Node.js उदाहरण page के पूरे scrollable हिस्से का PNG बनाता है। URL को अपने category/listing URL से बदलें:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import { chromium } from 'playwright';

const browser = await chromium.launch();
const page = await browser.newPage({
  viewport: { width: 1440, height: 900 },
  deviceScaleFactor: 1,
});

await page.goto('https://example.com/category', {
  waitUntil: 'domcontentloaded',
});

await page.screenshot({
  path: 'product-listing-full.png',
  fullPage: true,
  animations: 'disabled',
});

await browser.close();

example.com केवल उदाहरण URL है। domcontentloaded का अर्थ यह नहीं कि सभी product images या lazy-loaded rows तैयार हैं; नीचे दिए गए readiness checks अपने page के DOM के अनुसार जोड़ें।

#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

Python में वही full-page capture

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page(
        viewport={"width": 1440, "height": 900},
        device_scale_factor=1,
    )
    page.goto("https://example.com/category", wait_until="domcontentloaded")
    page.screenshot(
        path="product-listing-full.png",
        full_page=True,
        animations="disabled",
    )
    browser.close()

Python API में full_page=True और JavaScript में fullPage: true लिखा जाता है।

केवल product grid capture करें

Grid का स्थिर selector चुनें। data-testid अक्सर अपने test के लिए सुविधाजनक होता है, लेकिन यह selector तभी काम करेगा जब retailer page के DOM में वही attribute हो।

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
import { chromium } from 'playwright';

const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });

await page.goto('https://example.com/category', {
  waitUntil: 'domcontentloaded',
});

const grid = page.locator('[data-testid="product-grid"]');
await grid.waitFor({ state: 'visible' });

await grid.screenshot({
  path: 'product-grid.png',
  animations: 'disabled',
});

await browser.close();

Locator उदाहरण selector को वास्तविक page के अनुसार बदलें। आप accessible role/name या product-card structure पर आधारित locator भी चुन सकते हैं। Locator screenshot केवल चुने हुए element को crop करता है; अगर element किसी banner के पीछे ढका है, तो screenshot में ढके हुए pixels वैसे ही रहेंगे। Element detach हो जाने पर operation fail हो सकता है।

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

केवल visible होना पर्याप्त क्यों नहीं

waitFor({ state: 'visible' }) यह बताता है कि grid दिख रहा है, यह नहीं कि उसकी आखिरी lazy-loaded row भी आ गई है। यदि अपेक्षित card count ज्ञात है, तो उसी count की जाँच करें; अन्यथा अंतिम card या किसी page-specific readiness condition का इंतज़ार करें। उदाहरण में selector और count काल्पनिक हैं:

const cards = grid.locator('.product-card');
await page.waitForFunction(() => {
  const grid = document.querySelector('[data-testid="product-grid"]');
  return grid?.querySelectorAll('.product-card').length >= 40;
});

console.log('Cards rendered:', await cards.count());

अपने retailer page में .product-card और 40 को असली card selector और अपेक्षित संख्या से बदलें।

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.

Lazy loading और scrollable grid को संभालें

कई listing pages केवल viewport के पास की images या अगली product rows लोड करते हैं। पहले तय करें कि grid document के साथ scroll होता है या उसके अपने सीमित-height container में। फिर page के व्यवहार के अनुरूप scroll और readiness condition लगाएँ।

  1. Page पर जाएँ और consent dialog, location/pincode prompt या modal से content ढका हो तो अपनी test नीति के अनुसार उसे संभालें। किसी live retailer पर checkout या account action मानकर न चलें।
  2. Grid और cards के selectors तय करें। DOM में मौजूद स्थिर attribute, accessible role/name या वास्तविक product-card structure का उपयोग करें।
  3. अपेक्षित rows render कराएँ। अगर products scroll पर जुड़ती हैं, तो नियंत्रित ढंग से page या grid container scroll करें।
  4. परिणाम की शर्त जाँचें। अपेक्षित card count, अंतिम card की visibility या किसी अन्य page-specific संकेत का इंतज़ार करें; केवल network idle पर निर्भर न रहें। Analytics और polling के कारण network idle की उपयोगिता अलग-अलग pages में बदल सकती है।
  5. Screenshot लेकर जाँचें। PNG खोलकर पुष्टि करें कि आखिरी row आई है, कोई banner grid को नहीं ढक रहा, और अनचाहे header/footer शामिल नहीं हैं।

fullPage: true पूरे document की लंबाई capture करता है, लेकिन यह website से अगली product page या अभी तक न माँगी गई infinite-scroll items fetch कराने की guarantee नहीं है।

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.
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

Grid के अंदर scroll करने का उदाहरण

जब grid स्वयं scroll container हो, तो उसके भीतर आवश्यक हिस्से तक scroll करें और फिर cards की readiness जाँचें। यह उदाहरण केवल उस layout के लिए है जहाँ product-grid element में scrollbar और product cards हैं:

const grid = page.locator('[data-testid="product-grid"]');
await grid.waitFor({ state: 'visible' });

await grid.evaluate(async (element) => {
  element.scrollTop = element.scrollHeight;
});

await page.waitForFunction(() => {
  const grid = document.querySelector('[data-testid="product-grid"]');
  return grid?.querySelectorAll('.product-card').length >= 40;
});

await grid.screenshot({ path: 'product-grid.png', animations: 'disabled' });

यह scroll एक बार container के नीचे जाता है; जिन pages में scroll के बाद और items जुड़ती हैं, वहाँ page-specific loop और stopping condition की जरूरत पड़ सकती है। Locator screenshot का documented व्यवहार वर्तमान scrolled content तक सीमित है।

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.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Capture को repeatable बनाएँ

Visual comparison या बार-बार चलने वाले capture में viewport, browser/device scale और dynamic content को स्थिर रखें। Playwright screenshot API में path, fullPage, clip, mask, animations और scale जैसे विकल्प उपलब्ध हैं।

  • Animation बंद करें: animations: 'disabled' transitions या moving elements के बदलते frames से होने वाले अंतर घटाता है।
  • Dynamic हिस्से mask करें: बदलते banner या निजी जानकारी वाले area को mask करें, यदि वह आपके test के उद्देश्य के लिए आवश्यक नहीं है।
  • एक crop चाहिए: page screenshot में clip rectangle चुनें; grid-only capture के लिए locator screenshot अधिक सीधा विकल्प हो सकता है।
  • Scale स्थिर रखें: device scale output dimensions बदल सकता है। Baseline comparisons में समान viewport और scale रखें।
  • Visual assertion चाहिए: Playwright Test में expect(page).toHaveScreenshot() उपयोग करें। यह लगातार समान screenshots आने तक प्रतीक्षा करके फिर expected image से तुलना करता है; screenshot assertions Playwright Test runner में चलती हैं।

विकल्पों और visual assertions का विवरण Playwright screenshot assertions और Page API में है।

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

समस्याएँ और उनके कारण

  • नीचे की rows गायब हैं: वे lazy-load नहीं हुई होंगी, या grid का अपना scroll container होगा। आवश्यक हिस्से को scroll करें और अपेक्षित count या अंतिम card की शर्त पूरी होने तक प्रतीक्षा करें।
  • Screenshot बहुत लंबा है: आपने पूरे document का capture लिया है। केवल grid के लिए locator screenshot या अलग-अलग viewport captures चुनें।
  • Grid कट गया है: locator गलत wrapper पर हो सकता है, ancestor में fixed height या overflow लगा हो सकता है, अथवा grid का अपना scrollbar हो सकता है। DOM और computed layout देखकर सही element चुनें।
  • Banner या animation हर बार अलग दिखती है: animation बंद करें, उपयुक्त dynamic area mask करें और viewport/device scale स्थिर रखें।
  • Visual test बदलता रहता है: fonts और images की readiness, viewport, browser version तथा test data स्थिर करें। पुष्टि करें कि assertion Playwright Test runner के भीतर चल रही है।

Or skip the browser setup

अगर आपको script या local browser setup के बजाय एक request से screenshot चाहिए, तो ScreenshotNeo website screenshot API है। यह URL लेकर PNG, JPEG, WebP या PDF देता है; इससे पहले cookie/consent banner स्वीकार करता है और 60 से अधिक ज्ञात consent platforms, newsletter popups तथा chat widgets हटाता है। इन steps को बंद भी किया जा सकता है। केवल clean shots billed होते हैं: bot checks/CAPTCHAs, blank pages, timeouts, failed loads और cache hits का शुल्क नहीं लगता; response में X-Page-Verdict और X-Billed headers बताते हैं कि क्या हुआ।

ScreenshotNeo API docs देखें। cURL का एक-call उदाहरण:

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

इसमें YOUR_API_KEY को अपनी key से बदलें। ScreenshotNeo का MCP server Claude, Cursor और किसी भी MCP client के लिए take_screenshot, get_page_info और capture_pdf tools देता है। Free plan में बिना card के 1,000 screenshots/month हैं; paid plans $5 for 3,000 से शुरू होते हैं।

ScreenshotNeo पर मुफ़्त साइन अप करें—1,000 screenshots/month, बिना card के।

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

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.