Capture the current results state, click the site’s next-page control, wait for an observable change, then capture again. Repeat until the site confirms there is no next page. In Selenium, use a driver screenshot for the current browsing context or a WebElement screenshot when you only need the results region.
Choose what each screenshot should contain
Selenium’s driver screenshot captures the current browsing context; a WebElement screenshot captures a specific element such as the search-results container. Choose the driver when the image should retain surrounding navigation, page numbers, or status text. Choose the element when the deliverable is only the results region. These are screenshots of each pagination state, not necessarily one arbitrarily tall image of the entire document.
As an Amazon Associate I earn from qualifying purchases.
The general screenshot APIs do not establish identical full-document behavior across browsers. If you need one tall full-page image for every state, check support for your browser and driver; Selenium’s Python Firefox API separately documents a full-document screenshot method. See the Selenium browser interaction documentation and the Selenium Python API documentation.
Build a capture-and-advance loop
The following Python example shows the workflow. Replace the selectors and end condition with ones verified against the target site. It is a pattern, not a universal locator set or a tested script for a particular search engine.
#1 Best Overall
- Compatible with Nintendo Switch 2’s new GameChat mode
- Auto-Light Balance: RightLight boosts brightness by up to 50%, reducing shadows so you look your best—compared to previous-generation Logitech webcams (1)
- Privacy with a Slide: The integrated webcam cover makes it easy to get total, reliable privacy when you're not on a video call
- Built-In Mic: The built-in microphone lets others hear you clearly during video calls
- Easy Plug-And-Play: The Brio 101 works with most video calling platforms, including Microsoft Teams, Zoom and Google Meet—no hassle; it just works
from pathlib import Path
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
wait = WebDriverWait(driver, 10)
Path("screenshots").mkdir(exist_ok=True)
page_number = 1
max_pages = 100 # Defensive bound; choose a limit appropriate to the job.
while page_number <= max_pages:
results = wait.until(
EC.visibility_of_element_located((By.CSS_SELECTOR, ".results"))
)
# Capture the whole current browsing context:
driver.save_screenshot(f"screenshots/results-{page_number:03}.png")
# To capture only the results element instead, use:
# results.screenshot(f"screenshots/results-{page_number:03}.png")
next_button = driver.find_element(By.CSS_SELECTOR, "a.next")
if (not next_button.is_enabled()
or next_button.get_attribute("aria-disabled") == "true"):
break
old_results = results
next_button.click()
# Works when pagination replaces the results container.
wait.until(EC.staleness_of(old_results))
page_number += 1
else:
raise RuntimeError("Reached max_pages before detecting the final page")
The selector .results, the next control a.next, and the disabled-state check are examples only. Inspect the page and choose a stable results locator and a terminal condition that matches its actual markup.
Wait for the change that proves pagination finished
A successful click or a document reaching its ready state does not prove that JavaScript-rendered results have updated. Wait for evidence of the new state: replacement of the old results element, a changed current-page label, a changed URL, or a changed result identifier. Use the signal that actually changes on the site.
The example waits for the old results element to become stale. That is appropriate only if pagination replaces that node. If the site updates results in place, staleness will never occur; wait instead for a page marker, URL, or result text to change. Selenium’s waiting strategies documentation explains synchronization and explicit waits. Selenium notes that race conditions between browser state and automation commands are “one of the primary causes of flaky tests.”
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #2
- Compatible with Nintendo Switch 2’s new GameChat mode
- Crisp HD 720p/30 fps video calls with diagonal 55° field of view and auto light correction. Compatible with popular platforms including Skype and Zoom.
- The built-in noise-reducing mic makes sure your voice comes across clearly up to 1.5 meters away, even if you’re in busy surroundings.
- C270’s RightLight 2 feature adjusts to lighting conditions, producing brighter, contrasted images to help you look good in all your conference calls.
- The adjustable universal clip lets you attach the camera securely to your screen or laptop, or fold the clip and set the webcam on a shelf. You’re always ready for your next video call.
Use explicit waits consistently
Explicit waits let the script proceed when a relevant condition becomes true, rather than guessing how long the update takes. Selenium warns that mixing implicit and explicit waits can cause unpredictable total wait times. Prefer explicit waits for the specific state this loop needs.
Adapt the loop to the page’s pagination
Determine the final page
Do not assume every site disables its next button at the end. Use the site’s actual signal, such as a disabled next control, a final-page label, or a page marker that no longer changes. If the control remains enabled on the last page, stop based on another verified condition. Keep a maximum page count as a safety bound against loops that never reach a terminal state.
Reacquire elements after each transition
After pagination rebuilds part of the DOM, references to previously located elements can become stale. Locate the results element and next control again for each iteration; do not carry a button reference from one page into the next. Selenium describes stale element references in its troubleshooting documentation.
Rank #3
- 【Full HD 1080P Webcam】Powered by a 1080p FHD two-MP CMOS, the NexiGo N60 Webcam produces exceptionally sharp and clear videos at resolutions up to 1920 x 1080 with 30fps. The 3.6mm glass lens provides a crisp image at fixed distances and is optimized between 19.6 inches to 13 feet, making it ideal for almost any indoor use.
- 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 8, 10 & 11 / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
- 【Built-in Noise-Cancelling Microphone】The built-in noise-canceling microphone reduces ambient noise to enhance the sound quality of your video. Great for Zoom / Facetime / Video Calling / OBS / Twitch / Facebook / YouTube / Conferencing / Gaming / Streaming / Recording / Online School.
- 【USB Webcam with Privacy Protection Cover】The privacy cover blocks the lens when the webcam is not in use. It's perfect to help provide security and peace of mind to anyone, from individuals to large companies. 【Note:】Please contact our support for firmware update if you have noticed any audio delays.
- 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 10 & 11, Pro / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
Handle frames and nonstandard pagination
If results are inside an iframe, switch into that frame before finding or interacting with the results. Selenium otherwise searches the top-level document. See its frame interaction guide.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Numbered links may require selecting the next page number rather than clicking a next control. Infinite scrolling is a different interaction pattern: scroll to load additional results, wait for new content, and capture at the points that match your required output. In either case, define the state change and stopping condition before automating.
Keep captures comparable and useful
- Set a stable browser window size before the first capture if consistent image dimensions matter, and keep it unchanged throughout the loop.
- Use the driver screenshot when context around the results matters; use the results element screenshot when only that region belongs in the output.
- Choose a screenshot format and filename pattern suited to the downstream workflow. The example uses numbered PNG files so the capture order is apparent.
- If the requirement is a single tall image rather than one screenshot per pagination state, verify full-document capture support for the particular browser and driver instead of assuming a regular driver screenshot includes the whole page.
Troubleshoot common failures
The screenshot shows the previous page’s results
The click may have returned before the application finished rendering. Wait for a site-specific changed condition—such as a page label, URL, result identifier, or replaced results container—before taking the next screenshot. Browser document readiness alone does not guarantee that client-side results have updated.
Rank #4
- 1080P Webcam with Cover for Video Calls - EMEET computer webcam provides design and Optimization for professional video streaming. Realistic 1920 x 1080p video, 5-layer anti-glare lens, providing smooth video. C960 computer camera delivers 1920x1080 video with fixed focus (11.8–118.1 inches), so as to provide a clearer image. C960 USB webcam has a cover and can be removed automatically to meet your needs for privacy. For optimal image performance, use the webcam in a well-lit environment.
- Built-in 2 Omnidirectional Mics - EMEET webcam with microphone for desktop features 2 built-in omnidirectional microphones, picking up your voice to create clear audio for communication. When installing the webcam, select EMEET C960 as the default microphone input device in your computer and video applications and select C960 as the default device in Zoom/Teams and ensure microphone permissions are enabled for proper use. Please note that C960 does not include built-in speakers.
- Automatic Light Adjustment - Automatic exposure adjustment is applied in EMEET HD webcam 1080p so that the streaming webcam can deliver stable image performance. EMEET C960 camera for computer also features color adjustment and exposure optimization to help you look your best. For optimal video quality, it is recommended to use the webcam in normal or well-lit environments and select suitable video settings in your application. Proper lighting helps achieve a clearer and more balanced image.
- Plug-and-Play & Upgraded USB Connectivity - New C960 webcam features both USB Type-A & A-to-C adapter connections for wider compatibility. For stable performance, connect the webcam directly to the computer's main USB port and ensure the device is recognized correctly. If a hub or docking station is used, please ensure it provides sufficient power and stable data transmission, as limited ports may affect performance. 90° wide-angle lens captures more participants without frequent adjustments.
- High Compatibility & Multi Application - C960 webcam for laptop is compatible with Windows 10/11, macOS 10.14+, and Android TV 7.0+. Not supported: Windows Hello, TVs, tablets, or game consoles. It works with Zoom, Teams, Facetime, Google Meet, YouTube and more. Please select C960 webcam as the default camera and microphone device in your application and ensure camera/microphone permissions are enabled, especially on macOS. (Tips: Incompatible with Windows Hello)
The wait for staleness times out
The site may update the contents of the results container without replacing the container itself. Replace the staleness condition with a wait for a value that changes on each page, such as the current-page text or a result identifier.
An element is stale or the click fails
Find the current results and pagination elements again after each transition. If clicking still fails, inspect whether the control is displayed, enabled, and unobscured; an overlay or hidden control can prevent interaction. Selenium’s error guide covers common WebDriver failures.
Results cannot be found
Check that the selector matches the live page and that the results are not inside an iframe. If they are, switch to the correct frame before locating them. A selector that works on the first page may also need revision if later pages use different markup.
Best Value
- Compatible with Nintendo Switch 2’s new GameChat mode
- HD lighting adjustment and autofocus: The Logitech webcam automatically fine-tunes the lighting, producing bright, razor-sharp images even in low-light settings. This makes it a great webcam for streaming and an ideal web camera for laptop use
- Advanced capture software: Easily create and share video content with this Logitech camera that is suitable for use as a desktop computer camera or a monitor webcam
- Stereo audio with dual mics: Capture natural sound during calls and recorded videos with this 1080p webcam, great as a video conference camera or a computer webcam
- Full HD 1080p video calling and recording at 30 fps. You'll make a strong impression with this PC webcam that features crisp, clearly detailed, and vibrantly colored video
The loop never ends or reaches its limit
Verify the final-page signal and ensure it changes as expected. Do not retry a timed-out transition indefinitely or treat a consent prompt, login page, bot check, or usage-limit screen as another results page. Follow the site’s permitted access and terms; inspect the current URL and page state before changing the condition.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
ScreenshotNeo takes a screenshot from one GET request; its API documentation covers the available options. For example, capture a search-results URL like this:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/search?q=selenium -o shot.webp
ScreenshotNeo accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks, 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 for AI agents and MCP clients. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots.
Recommended Free Tools
Sign up free for 1,000 screenshots a month, with no card required.
Frequently Asked Questions
Does Selenium save a screenshot directly to a file?
Yes. In Python, the example uses `driver.save_screenshot(path)` for the browsing context and `element.screenshot(path)` for a specific element.
Will this capture every result in a search, including results below the fold?
It captures a screenshot for each pagination state. A regular driver screenshot should not be assumed to create one full-document image; full-page behavior depends on browser and driver support.
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.
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 →

