In Selenium Python, navigate to the page, wait for the document or page-specific content you need, then call driver.save_screenshot("page.png"). Selenium’s default navigation strategy waits for the document’s readyState to reach complete; for content added later by JavaScript, use an explicit wait for a meaningful element or state before capturing.
Capture after the content you need is ready
For a page whose desired content is present when navigation completes, Selenium’s default page-load strategy is usually sufficient. For a single-page application, search results, or another component populated asynchronously, wait for that specific content rather than assuming document readiness means the whole application is finished.
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
with webdriver.Chrome() as driver:
driver.get("https://example.com")
# Choose a selector that appears when the content for your screenshot is ready.
WebDriverWait(driver, 15).until(
EC.visibility_of_element_located((By.CSS_SELECTOR, "main .results"))
)
driver.save_screenshot("page.png")
Replace the example URL, selector, and timeout with values appropriate to your site. The selector must identify an element that represents readiness for the content you want in the image. The explicit wait polls until its condition succeeds or the timeout expires. Selenium’s Waiting Strategies documentation describes this condition-based approach.
What Selenium means by “page loaded”
During URL navigation, Selenium’s default normal page-load strategy waits for the document readiness state complete. That threshold covers resources associated with the document, but it cannot guarantee that a JavaScript application has finished later updates, API requests, animations, or other work. See Selenium’s official Browser Options guide.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#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
The alternatives change when navigation returns, not whether an application-specific element is ready:
| Strategy | Navigation threshold | Use and trade-off |
|---|---|---|
normal (default) |
Waits for readyState complete. |
Appropriate when the screenshot content is available by document completion; navigation may wait for more resources. |
eager |
Returns at interactive / the DOMContentLoaded threshold. |
Can return sooner, while resources such as images may still be loading. |
none |
Does not block on document readiness. | Returns without waiting for document readiness; use only when your workflow handles readiness separately. |
These are session-level options. Even with normal, eager, or none, use an explicit wait for the actual content or state needed in the screenshot when it is produced after navigation.
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
Choose a wait condition that matches the screenshot
A wait should observe the outcome you need, not merely consume a fixed amount of time. Selenium’s explicit wait supports conditions such as an element being present or visible. For a screenshot of updated results, wait for the results container or another reliable signal that the update occurred. The example above uses visibility; adapt it to the page’s actual markup and behavior.
- Use document readiness alone when the required content is already in the document at navigation completion.
- Use an explicit element or state wait for content that appears after an API response, user action, or other JavaScript work.
- A fixed sleep may wait too long on a fast run and still be too short on a slow one; a condition-based wait ends when the selected condition succeeds or times out.
Do not casually combine implicit and explicit waits. Selenium warns that mixing them can lead to unpredictable wait durations. For this capture step, a targeted explicit wait makes the readiness requirement local and clear.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesRank #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.
Save the screenshot
After the wait succeeds, driver.save_screenshot("page.png") saves the current window as a PNG file. If your program needs the image bytes instead of a file, Selenium’s Python WebDriver API also provides get_screenshot_as_png(). Consult the Selenium Python WebDriver API for these methods.
Troubleshoot a screenshot that is early or missing
The screenshot is taken before results appear
Document completion can happen before a single-page application finishes its later JavaScript work. Add an explicit wait for an element or state that corresponds to the results, then capture only after that wait succeeds.
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
The explicit wait times out
Check that the locator matches the current page, the expected condition matches what the page actually does, and the browser is in the expected window or frame. Also check whether a navigation, overlay, or page transition changed the context. Increase the timeout only if the condition is correct and the site reasonably needs more time; a larger timeout does not fix a wrong selector or a condition that never occurs.
Navigation itself times out
A page-load timeout limits how long Selenium waits for navigation; it is not proof that application-specific asynchronous work has completed. Treat navigation timeout handling and the explicit wait for screenshot readiness as separate concerns. Selenium’s Python WebDriver API documents the driver’s timeout behavior.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →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.
The image file is not where expected
save_screenshot writes the PNG using the path supplied to it. Use an explicit output path if your job’s working directory is not predictable, and ensure the process can write to that location.
Or skip the browser setup:
ScreenshotNeo can return a screenshot or PDF with one GET request, without you managing a Selenium browser session. Its capture process accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before the shot; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. ScreenshotNeo also offers an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents.
Example using cURL (replace the URL and API key):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
See the ScreenshotNeo documentation for request options. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo and get 1,000 free screenshots a month with no card.
Frequently Asked Questions
Does Selenium have a built-in command that waits for every JavaScript update?
No single document-readiness threshold guarantees that all application-specific JavaScript work is finished. Wait for a page-specific condition that represents the content you need.
Can I save Selenium’s screenshot as image bytes instead of a file?
Yes. The Python WebDriver API provides get_screenshot_as_png() for binary PNG data.
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.

