Navigate to the payment page, wait for the browser to show the state you need, then call await page.screenshot({ path: 'payment.png' }). Playwright captures the current viewport by default; add fullPage: true for the whole scrollable page, or use a locator screenshot for one component. A screenshot records what the browser displayed—it does not prove that a UPI payment was authorized or completed.
Capture the payment page with Playwright
The examples below use Playwright’s JavaScript API and assume you already have a page object. Navigate to the target URL and wait for the checkout content you want to document before capturing it.
As an Amazon Associate I earn from qualifying purchases.
await page.goto('https://example.com/checkout');
await page.getByRole('heading', { name: 'Payment' }).waitFor();
await page.screenshot({ path: 'payment.png' });
Replace the example URL and heading with ones from your application. The heading wait is useful only if that accessible heading exists; choose a locator that matches the target page. For a known static or test page, wait for the specific state you need rather than assuming navigation alone means the payment UI is ready. The Playwright screenshot guide shows the basic workflow.
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 →Choose the capture area
Current viewport
page.screenshot() captures the currently visible browser viewport by default. Use this for a single checkout step or a view where the visible area is the evidence you need.
#1 Best Overall
- 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.
Entire scrollable page
Set fullPage: true to capture the full scrollable document, including content below the fold:
await page.screenshot({ path: 'payment-full.png', fullPage: true });
One payment component
Use locator.screenshot() to capture a specific element, such as a payment summary. The selector must actually match an element in the page:
Rank #2
- Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Tracfone plan required, activating is easy, just 3 steps.
- DISPLAY: Immersive viewing on a 6.7-inch super-bright 120Hz display with powerful stereo speakers and Bass Boost for cinematic entertainment.
- CAMERA SYSTEM: Advanced 50MP Quad Pixel camera captures sharp, detailed photos and videos in any lighting condition
- PERFORMANCE: Lightning-fast 5G connectivity paired with a powerful processor and RAM Boost for smooth multitasking.
- BATTERY LIFE: Long-lasting 5000mAh battery with TurboPower charging technology delivers hours of power in minutes.
await page.locator('[data-testid="payment-summary"]')
.screenshot({ path: 'payment-summary.png' });
The sample selector is a pattern, not a claim that a particular merchant uses that test ID. If the locator does not match, inspect the page and use a selector supported by the target application.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Set output format and resolution
The Playwright Page API supports PNG, JPEG, and WebP screenshots. A path with an appropriate extension saves the image to a file. If you omit the path, the API returns image bytes that you can pass to another part of your application.
Rank #3
- 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.
const imageBytes = await page.screenshot({ type: 'jpeg', quality: 80 });
JPEG quality is configurable; the quality option does not apply to PNG. Choose scale based on how the image will be used:
scale: 'css'produces one image pixel per CSS pixel.scale: 'device'follows the device pixel ratio and can produce a larger image.
await page.screenshot({ path: 'payment.webp', type: 'webp', scale: 'css' });
For version-specific options and current behavior, consult the Page screenshot API reference.
Rank #4
- PRIVACY DISPLAY: Automatically hide your screen from those beside you. The built-in privacy display can be preset¹ to turn on when receiving notifications, typing passwords, or using specific apps
- 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
- NIGHTS, CAPTURED CLEARLY: From gigs to city lights, record and capture moments after dark with clarity using Nightography so your photos and videos stay crisp and clear on your Samsung Galaxy
- MAKE IT. EDIT IT. SHARE IT: Turn everyday moments into something personal with creative tools built right into your mobile phone, whether it’s a special contact photo, custom wallpaper, an invitation or more⁴
- HELP THAT KEEPS UP: Stay in the moment while Now Nudge with Galaxy AI helps you respond faster and stay organized with smart suggestions⁵ that appear exactly when you need them on your phone
Stabilize dynamic content and protect private values
Payment pages can contain changing totals, animated elements, or transaction-specific details. Decide whether your goal is to preserve the page’s live appearance or produce a stable test artifact. Playwright’s screenshot options include animation handling, injected screenshot styles, timeout behavior, and locator masking; use the API reference for the exact options supported by your installed version.
Before keeping or sharing an image, review it for personal and payment information. Mask sensitive fields where appropriate, or capture only a component that excludes them. NPCI’s FAQ states: “Please do not share your UPI-PIN with anyone.” A webpage screenshot should never be used to expose a PIN or other secret credentials.
Best Value
- Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Activating is easy, just 3 steps.
- ACTIVATION Promotion: Includes 1500 min, 1500 texts & 1500 MB Data + add more as you need it
- CAMERA SYSTEM: 50MP Quad Pixel camera. Capture sharper, more vibrant photos day or night with 4x the light sensitivity.
- PERFORMANCE: Blazing-fast Qualcomm performance. Get the speed you need for great entertainment with a Snapdragon 680 processor and 4GB of RAM.
- 64GB built-in storage. Get plenty of room for photos, movies, songs, and apps. Made for US
What a UPI webpage screenshot can and cannot show
NPCI describes UPI as an instant payment system. Its online merchant example has the customer enter a payment address, receive a collect request in the BHIM app, and enter the UPI PIN in that app to complete payment. The browser capture documents the merchant webpage’s displayed state; by itself, it cannot establish that the user authorized a request or that money transferred. See NPCI’s UPI FAQ.
For international merchant locations using UPI Global Acceptance, NPCI advises users to review the payment details, including the final amount in both currencies and applicable exchange rates or fees, before authorization in a UPI-powered application. This is a user verification consideration, not a Playwright testing requirement. See NPCI’s UPI Global Acceptance guidance.
Or skip the browser setup
ScreenshotNeo can return a website screenshot from one GET request. It accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps 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 server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. Free includes 1,000 shots a month with no card; paid plans start at $5 for 3,000 shots. See ScreenshotNeo and its API documentation.
Recommended Free Tools
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Replace the example URL with the page you need to capture and use your API key. The service supports screenshot and PDF output; review the documentation for request parameters and response handling. A screenshot of a payment page still documents browser content only, not successful UPI authorization or settlement. Sign up for 1,000 free screenshots a month, with no card required.
Quick Recap
Troubleshooting
- The screenshot is taken before the content appears: wait for a page-specific heading, locator, or other state that indicates the intended checkout view is ready. Avoid relying on an arbitrary delay if a meaningful locator is available.
- The image omits content below the fold: use
fullPage: true, or capture the specific below-the-fold element with a locator screenshot. - The locator capture fails: check that the selector exists in the rendered page and identifies the intended element. The sample
data-testidis not universal. - The image has unexpected dimensions or file size: select CSS-pixel or device-pixel scale deliberately; device scale follows the device pixel ratio and may create a larger image.
- Private transaction details appear in the output: mask the relevant locator, use screenshot styles where suitable, or narrow the capture area. Inspect the saved image before distributing it.
- The page changes between runs: identify whether animation or other dynamic behavior is the cause, then use Playwright’s screenshot options to control the capture. Check the API reference for syntax that matches your installed Playwright version.
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.

