DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk2 min

Puppeteer में Mobile Website Screenshot कैसे Capture करें

Puppeteer में पहले device profile या custom mobile viewport लागू करें, फिर पेज खोलें और screenshot लें। जानें full-page capture, output formats और troubleshooting के तरीके।
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Puppeteer में मोबाइल वेबसाइट का screenshot लेने के लिए पहले mobile device emulate करें या custom mobile viewport सेट करें, फिर पेज खोलकर page.screenshot() चलाएँ। Emulation navigation से पहले लागू करें, ताकि वेबसाइट शुरुआत से ही चुनी गई mobile settings के साथ लोड हो।

Device profile से मोबाइल screenshot लें

जब किसी ज्ञात फोन की viewport और user-agent settings चाहिए हों, Puppeteer के KnownDevices से profile चुनें और page.emulate() चलाएँ। आधिकारिक API में iPhone 17 Pro profile का उदाहरण है; आपके installed Puppeteer version में profile का नाम उपलब्ध है या नहीं, यह जाँचें। Puppeteer Page.emulate() documentation

As an Amazon Associate I earn from qualifying purchases.

import puppeteer, {KnownDevices} from 'puppeteer';

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  const iPhone = KnownDevices['iPhone 17 Pro'];

  await page.emulate(iPhone); // Navigation से पहले emulation लागू करें
  await page.goto('https://example.com', {waitUntil: 'networkidle2'});
  await page.screenshot({path: 'mobile-screenshot.png'});
} finally {
  await browser.close();
}

page.emulate() device metrics और user agent लागू करता है; यह setUserAgent() तथा setViewport() का shortcut है। Puppeteer चेतावनी देता है कि emulation page का आकार बदलती है, इसलिए इसे navigation से पहले लगाएँ। आधिकारिक API टिप्पणी

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

Navigation और screenshot का इंतज़ार

उदाहरण में networkidle2 navigation विकल्प है। हर वेबसाइट का load behavior अलग होता है; यदि screenshot किसी खास widget या सामग्री का होना चाहिए, तो capture से पहले उस element के दिखाई देने या उपलब्ध होने की प्रतीक्षा करें। Puppeteer की screenshot guide भी screenshot के लिए Page.screenshot() और navigation के उदाहरण देती है।

#1 Best Overall
Sale
Samsung Galaxy A17 5G Smart Phone 128GB US 1 Yr Manufacturer Warranty Black
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.

अपना mobile viewport तय करें

यदि किसी device profile के बजाय अपनी CSS-pixel dimensions चाहिएँ, page.setViewport() इस्तेमाल करें। deviceScaleFactor pixel density emulation के लिए है; isMobile mobile behavior और hasTouch touch input emulation सक्षम करते हैं। ये settings भी URL खोलने से पहले लगाएँ।

import puppeteer from 'puppeteer';

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  await page.setViewport({
    width: 390,
    height: 844,
    deviceScaleFactor: 3,
    isMobile: true,
    hasTouch: true,
  });
  await page.goto('https://example.com');
  await page.screenshot({path: 'custom-mobile.png'});
} finally {
  await browser.close();
}

Puppeteer के device definitions में viewport, scale factor, mobile flag, touch और orientation जैसी values दी जाती हैं। KnownDevices definitions देखें। Viewport बदलने से page resize होता है; कुछ परिस्थितियों में isMobile या hasTouch लागू करने के लिए reload भी हो सकता है। Page.emulate() documentation

Rank #2
Samsung Galaxy S26, Unlocked Android Smartphone, 256GB, Black
  • TYPE IT IN. TRANSFORM IT FAST: Enhance any shot in seconds on your smartphone by using Photo Assist¹ with Galaxy AI.² Add objects, restore details, or apply new styles by simply typing or tapping
  • MAKE IT. EDIT IT. SHARE IT: Turn everyday moments into something personal with creative tools built right into your mobile whether it’s a special contact photo, custom wallpaper, an invitation or more³
  • FAST. POWERFUL. AI-READY: Power through your day with AI-accelerated performance from our fastest, smoothest and most powerful Galaxy processor yet, built to keep up with everything you do
  • IMMENSELY IMMERSIVE: No matter where you are or what you’re watching, your favorite videos and more come to life with the vibrant display on Galaxy S26
  • FIT EVERYONE IN THE SHOT: Group selfies are easier on your Samsung phone with a wider front camera⁴ that captures more of the scene, so no one gets left out of the moment

Device profile या custom viewport: कौन चुनें?

विकल्प क्या सेट होता है कब चुनें
KnownDevices और page.emulate() Device profile के metrics और user agent साथ लागू होते हैं। जब किसी सूचीबद्ध device की settings के करीब emulation चाहिए।
page.setViewport() Width, height, density, mobile और touch values आप तय करते हैं। जब तय dimensions, custom density या अपनी portrait/landscape configuration चाहिए।

दोनों तरीके browser में mobile settings emulate करते हैं; इन्हें वास्तविक handset पर पूर्ण परीक्षण न समझें।

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

Viewport screenshot और पूरी page का screenshot

सामान्य screenshot दिखाई दे रहे viewport को capture करता है। पूरी document height चाहिए तो fullPage: true दें; Puppeteer में इसका default false है।

Rank #3
Sale
Samsung Galaxy A17 5G Smart Phone 128GB, US 1 Yr Manufacturer Warranty Blue
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.
await page.screenshot({
  path: 'full-mobile-page.png',
  fullPage: true,
});

ScreenshotOptions documentation में fullPage और screenshot विकल्प दर्ज हैं। लंबे पेज पर lazy-loaded images या अन्य सामग्री capture से पहले उपलब्ध न हों, तो screenshot से पहले उपयुक्त UI या content के आने की प्रतीक्षा करें।

फाइल, image format और लौटने वाला डेटा

  • path देने पर screenshot उस path पर सहेजा जाता है। Path की extension से image type infer की जा सकती है।
  • Explicit format चाहिए तो type दें; documented default PNG है।
  • quality lossy formats, जैसे JPEG, के लिए है; PNG पर लागू नहीं होता।
  • path न देने पर screenshot disk पर नहीं लिखा जाता: API binary Uint8Array लौटाती है। Base64 encoding माँगने पर string लौटती है।

इन return और format व्यवहारों के लिए Puppeteer की Page.screenshot() API और ScreenshotOptions देखें।

Rank #4
Sale
Motorola Moto G Play LTE | Unlocked | Made for US 4/64GB | 50MP Camera | Sapphire Blue
  • Blazing-fast Qualcomm performance. Get the speed you need for great entertainment with a Snapdragon 680 processor and 4GB**** of RAM.
  • Fluid display + immersive stereo sound. Bring your entertainment to life with an ultrawide 6.5" 90Hz* HD+ display plus stereo speakers, Dolby Atmos, and Hi-Res Audio**.
  • 50MP*** Quad Pixel camera. Capture sharper, more vibrant photos day or night with 4x the light sensitivity.
  • 64GB**** built-in storage. Get plenty of room for photos, movies, songs, and apps—and add up to 1TB more with a microSD card*****.
  • Unbelievable battery life. Work and play nonstop with a long-lasting 5000mAh battery.*****

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

  • पेज desktop layout में खुलता है: जाँचें कि page.emulate() या page.setViewport() को page.goto() से पहले बुलाया गया है।
  • चुना हुआ device profile नहीं मिलता: अपने installed Puppeteer version की KnownDevices सूची में profile का नाम जाँचें; उपलब्ध होने की पुष्टि किए बिना दूसरे version का नाम न मानें।
  • Screenshot में widget या lazy image गायब है: navigation के बाद उस element या सामग्री के उपलब्ध होने तक प्रतीक्षा करें; केवल network-idle पर निर्भर रहना हर site के लिए पर्याप्त नहीं हो सकता।
  • पूरे पेज की जगह केवल viewport capture हुआ: screenshot options में fullPage: true जोड़ें।
  • PNG के साथ quality बदलने पर असर नहीं दिखता: quality lossy formats के लिए है, PNG के लिए नहीं।
  • फ़ाइल नहीं बनती: screenshot options में लिखने योग्य path दें; path न होने पर API bytes लौटाती है, disk file नहीं।
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

अगर आपको browser और Puppeteer चलाए बिना URL से screenshot चाहिए, ScreenshotNeo एक website screenshot API और MCP server है। एक GET request से PNG, JPEG, WebP या PDF मिल सकता है। इसकी API docs देखें।

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

ScreenshotNeo capture से पहले cookie/consent banners स्वीकार और हटाता है तथा 60 से अधिक ज्ञात consent platforms, newsletter popups और chat widgets हटा सकता है; हर कदम बंद किया जा सकता है। Bot checks/CAPTCHAs, blank pages, timeouts, failed loads और cache hits के लिए शुल्क नहीं लगता; response में X-Page-Verdict और X-Billed headers बताते हैं कि परिणाम क्या था और बिल हुआ या नहीं। Claude, Cursor और अन्य MCP clients के लिए take_screenshot, get_page_info और capture_pdf tools वाला MCP server भी है। Free plan में बिना card 1,000 screenshots प्रति माह हैं; paid plans $5 में 3,000 से शुरू होते हैं।

ScreenshotNeo पर मुफ्त खाता बनाएँ।

Best Value
Samsung Galaxy A17 5G Smart Phone 128GB, US 1 Yr Manufacturer Warranty Gray
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.

Frequently Asked Questions

क्या Puppeteer का mobile screenshot वास्तविक फोन पर capture किया जाता है?

नहीं। Puppeteer browser में device settings emulate करता है; यह वास्तविक handset पर पूर्ण परीक्षण के बराबर नहीं है।

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.

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
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

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.