Recommended Free Tools
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Use Selenium WebDriver to open a specific property-listing URL, wait for the content you need, and save either the browser window or a chosen element as a PNG. Before automating, check the individual portal’s terms and get any permission required; Selenium’s ability to open a page does not grant permission to automate it.
Check the portal’s terms before you capture
Decide which portal and pages you intend to capture, how often you will run the workflow, and how you will store or use the screenshots. Then review that portal’s current terms and obtain permission when required. Rules differ by site and by intended use.
For example, eRealtor’s terms, in force from 25 July 2026, state that they are governed by Indian law and prohibit bots, crawlers, and automated tools against the platform except ordinary public-search-engine indexing. They also restrict scraping, copying, or republishing listings and media without written permission. Those terms apply to eRealtor; they do not establish the rules for other Indian property portals. Read eRealtor’s terms and conditions.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchInstall Selenium and a browser
This example uses Python and Chrome. Install Selenium, install Chrome, and make sure your Selenium setup can obtain or locate a compatible ChromeDriver. Selenium’s current driver-management behavior can vary with your environment; if driver startup fails, consult the Selenium WebDriver documentation.
#1 Best Overall
python -m pip install selenium
Save the following as capture_listing.py. Replace the example URL and selectors with a page and markup you are authorized to automate.
from pathlib import Path
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
URL = "https://example.com/property-listing"
OUTPUT_DIR = Path("screenshots")
OUTPUT_DIR.mkdir(exist_ok=True)
options = webdriver.ChromeOptions()
# Uncomment for a headless browser run:
# options.add_argument("--headless=new")
# A context manager closes the browser session even if capture raises an error.
with webdriver.Chrome(options=options) as driver:
driver.set_window_size(1440, 1000)
driver.get(URL)
wait = WebDriverWait(driver, 20)
heading = wait.until(
EC.presence_of_element_located((By.CSS_SELECTOR, "h1"))
)
# Option A: capture the current browser window as a PNG.
ok = driver.save_screenshot(str(OUTPUT_DIR / "listing-window.png"))
if not ok:
raise RuntimeError("Selenium could not save the window screenshot")
# Option B: capture one element instead. Replace the selector with a
# stable locator for the listing card or content block you want.
card = wait.until(
EC.visibility_of_element_located(
(By.CSS_SELECTOR, "[data-testid='listing-card']")
)
)
card.screenshot(str(OUTPUT_DIR / "listing-card.png"))
The sample waits for an h1 and a visible element matching [data-testid='listing-card']. These are examples, not selectors verified for any particular portal. Inspect the authorized target page and substitute its actual, stable markup.
Choose what the screenshot should include
Capture the browser window
driver.save_screenshot(filename) saves the current window as a PNG and reports whether the save succeeded. Use it when the surrounding page context matters, such as the listing title, price, navigation, or visible search results. A window screenshot reflects the current browser viewport; it is not automatically a full-page capture.
Rank #2
Capture a page element
Call screenshot(filename) on a located element to save that element as a PNG. This is useful when the artifact should be a particular listing card or content block rather than the surrounding interface. Confirm that the element is visible and that the saved image contains the expected content.
Selenium’s official examples show taking an element screenshot; the Python API documents saving the current window as a PNG.
Wait for the content you actually need
Listing pages can populate asynchronously or show overlays. Wait for a condition tied to the capture goal—for example, the listing heading appearing, the card becoming visible, or a particular image finishing its load—rather than assuming a fixed pause means the page is ready. The sample’s explicit wait gives the page up to 20 seconds for the requested element; adjust the timeout for your authorized workflow and observed page behavior.
Rank #3
If you need to verify an image itself, a page element being present may not be enough. You can wait for an image element and check its browser-reported completion state:
image = wait.until(
EC.presence_of_element_located(
(By.CSS_SELECTOR, "img[data-testid='listing-image']")
)
)
wait.until(lambda _driver: image.get_attribute("complete") == "true")
The selector is illustrative: use a real image selector from the target page. If the page uses lazy loading, the image may not load until it is near the viewport; scrolling the intended element into view before waiting can help. Avoid treating this example as confirmation of any particular portal’s loading behavior.
Use locators that can survive modest page changes
Selenium recommends a unique, predictable ID when one is available. Otherwise, prefer a concise CSS selector grounded in stable markup, such as a documented data attribute. Avoid generated styling classes unless you have confirmed they remain stable. XPath can be harder to debug, and complex DOM traversal can be costly. Validate each locator against the page you actually intend to capture. Selenium’s locator guidance was last modified on 10 February 2022.
Keep runs controlled and filenames distinct
For a small capture workflow, maintain an explicit list of pages you are permitted to visit instead of following every link on a site. Selenium identifies link spidering among discouraged practices. See Selenium’s guidance on link spidering.
If you capture multiple pages, use filenames that identify the page and avoid overwriting earlier output. For example, build a filename from an internal record ID or a sanitized URL component, and keep a capture log connecting that filename to the source URL and time. Avoid putting personal or sensitive listing data in filenames unless your handling rules allow it.
Free tools Windows power users keep installed
One-click scans. No signup required.
When local Chrome is enough—and when to use Grid
A single local browser is a practical starting point for one repeatable capture path. Selenium Grid is infrastructure for allocating browsers across different browsers and operating systems; consider it when your requirement actually calls for distributed execution or cross-browser coverage, rather than adding it to a one-browser task by default. Selenium’s Grid documentation describes that scaling role.
Best Value
Troubleshooting common capture failures
- Chrome fails to start: Check that Chrome is installed and that your Selenium and browser-driver setup can find a compatible driver. Review the exception text and the WebDriver setup documentation.
- The wait times out: The selector may not exist on that page, may be incorrect, or may refer to content that never becomes visible. Inspect the authorized page, verify the locator, and set a timeout appropriate to the page’s observed loading behavior.
- The screenshot is blank or incomplete: Confirm that navigation reached the expected page and the capture condition is satisfied before taking the image. For a specific element, wait for visibility; for an image, check that it has loaded and account for lazy loading.
- The screenshot is the wrong size or scope: A window screenshot captures the current viewport, while an element screenshot captures only the selected element. Set the window dimensions before navigation if viewport size matters, and verify the output rather than assuming a full-page image.
- The output file is missing or overwritten: Check the return value of
save_screenshot, ensure the output directory exists, and use a distinct filename for each intended capture. - The site blocks automation or its terms prohibit it: Stop rather than trying to evade access controls. Confirm the portal’s current terms and seek authorization where needed.
Or skip the browser setup
ScreenshotNeo offers a website screenshot API and MCP server. One GET request can return an image or PDF. Its capture workflow accepts consent banners like a visitor and removes 60+ known consent platforms, newsletter popups, and chat widgets before the shot; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses identify the page verdict and billing status. AI agents can use its MCP tools, including take_screenshot, get_page_info, and capture_pdf. See ScreenshotNeo and the API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/property-listing -o shot.webp
Replace the example URL with the page you are authorized to capture. ScreenshotNeo’s free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. These service features do not replace checking the target portal’s terms or obtaining permission for your intended use. Sign up for 1,000 free screenshots a month, with no card required.
Frequently Asked Questions
Does Selenium save screenshots as PNG?
Yes. Selenium’s Python WebDriver API documents saving the current window as a PNG, and an element’s screenshot method also writes a PNG image.
Will the same CSS selector work on every Indian property portal?
No. Selectors depend on each page’s markup. Inspect and validate the locator on the specific authorized page you plan to capture.
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.

