Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › Firefox

How to Take a Full-Page Screenshot of a Logged-In WordPress Admin Page with Selenium

By Freedom251 Team · · 6 min read

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

Use Selenium to sign in through WordPress’s normal browser login, open the admin page, wait for its content to render, and then capture it with a full-document screenshot method supported by your browser and Selenium binding. The documented example below is specifically for Python with Firefox; other combinations may require a different method.

What you need before capturing

  • A WordPress account authorized to view the target admin page. Use a test account with only the access it needs.
  • A Selenium WebDriver setup for the browser you intend to automate. Selenium WebDriver controls a browser locally or through Selenium Server; see the Selenium WebDriver documentation.
  • The target admin page’s exact URL and a page-specific condition you can use to determine when its important content is ready.
  • An absolute output path that the process running Selenium can write to.

Use HTTPS for the WordPress site. WordPress recommends HTTPS for secure authentication cookies.

As an Amazon Associate I earn from qualifying purchases.

Log in through WordPress’s normal browser flow

  1. Start your Selenium WebDriver session.
  2. Open the site’s login route, usually https://example.com/wp-login.php. WordPress documents wp-login.php as the login page; a logged-out visit to /wp-admin/ redirects there.
  3. Enter the authorized account’s username and password in the site’s login form and submit it. Handle any site-specific two-factor prompt or login-plugin steps as required.
  4. Wait for an observable logged-in state, then navigate to the exact admin URL you want to capture.
  5. Wait for the page’s relevant content to appear or finish updating before taking the screenshot.

Do not use a WordPress Application Password in the browser login form. Application Passwords are for API authentication and cannot be used to sign in at wp-login.php. WordPress explains their scope and handling in its Application Passwords documentation.

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

Python and Firefox: capture the full document

Selenium’s Python Firefox WebDriver API documents get_full_page_screenshot_as_file(filename). It saves a PNG of the current document and returns False if an I/O error occurs. The reference identifies this API as Selenium 4.50.0. Check the API documentation for your installed version and setup before relying on the method.

#1 Best Overall
Sale
Epson Workforce ES-50 Compact & Lightweight Mobile Document Scanner | For Computers including PC and Mac Receipt and Document Scanner USB Powered
  • PORTABLE SCANNER FOR USE ON-THE-GO — The fastest and lightest mobile single-sheet-fed compact document scanner in its class¹
  • QUICK DOCUMENT SCANNING ― This Epson ultra-fast scanner scans a single page as quickly as 5.5 seconds²; Windows and Mac compatible
  • VERSATILE PAPER HANDLING ― Portable scanner scans documents up to 8.5 x 72 in; Also easily digitizes receipts and ID cards to make accounting, bookkeeping, and organizing simpler
  • INTUITIVE, HIGH-SPEED SOFTWARE — Epson ScanSmart Software³ is a smart tool allowing you to easily scan, review, and save; Stay organized easily with the help of this Epson scanner
  • EASY SETUP — USB-powered connect to your computer for quick and simple scanning; No batteries or external power supply required to operate portable document scanner; Standard Connectivity: USB 2.0

The example assumes your Firefox WebDriver session is already running and that you have completed the login steps above. Replace the example URLs, selectors and file path with values for your site. The wait condition is illustrative: choose a selector that signifies the content you actually need, not merely a generic page element.

from pathlib import Path
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait

# Assumes `driver` is an active Selenium Firefox WebDriver session.
login_url = "https://example.com/wp-login.php"
admin_url = "https://example.com/wp-admin/edit.php"
output_path = Path("/absolute/path/admin-page.png")

# Open the login page and complete the site's normal login flow.
driver.get(login_url)
driver.find_element(By.ID, "user_login").send_keys("YOUR_USERNAME")
driver.find_element(By.ID, "user_pass").send_keys("YOUR_PASSWORD")
driver.find_element(By.ID, "wp-submit").click()

# Wait for an observable authenticated state; adapt this to your site.
WebDriverWait(driver, 20).until(
    EC.presence_of_element_located((By.ID, "wpadminbar"))
)

# Visit the page to capture and wait for its relevant content.
driver.get(admin_url)
WebDriverWait(driver, 30).until(
    EC.presence_of_element_located((By.ID, "wpbody-content"))
)

output_path.parent.mkdir(parents=True, exist_ok=True)
saved = driver.get_full_page_screenshot_as_file(str(output_path))
if not saved or not output_path.is_file():
    raise OSError(f"Screenshot was not saved to {output_path}")

print(f"Saved screenshot to {output_path}")

See the Python Firefox WebDriver API reference for the documented method and its return behavior. This example does not cover a site’s custom login fields, two-factor flow, or page-specific asynchronous behavior; adapt those parts to the actual site.

Rank #2
Sale
Brother DS-640 Compact Mobile Document Scanner, (Model: DS640)
  • FAST SPEEDS - Scans color and black and white documents a blazing speed up to 16ppm (1). Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
  • ULTRA COMPACT – At less than 1 foot in length and only about 1. 5lbs in weight you can fit this device virtually anywhere (a bag, a purse, even a pocket).
  • READY WHENEVER YOU ARE – The DS-640 mobile scanner is powered via an included micro USB 3. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan.
  • WORKS YOUR WAY – Use the Brother free iPrint&Scan desktop app for scanning to multiple “Scan-to” destinations like PC, Network, cloud services, Email and OCR. (2) Supports Windows, Mac and Linux and TWAIN/WIA for PC/ICA for Mac/SANE drivers. (3)
  • OPTIMIZE IMAGES AND TEXT – Automatic color detection/adjustment, image rotation (PC only), bleed through prevention/background removal, text enhancement, color drop to enhance scans. Software suite includes document management and OCR software. (4)

Wait for the right content, then validate the image

A successful navigation does not necessarily mean that dynamic admin content has finished loading. Selenium documents waiting strategies; use a condition tied to the content needed in the screenshot, such as a particular table, heading, or status element. A fixed sleep may be useful for a known animation or delay, but it is less reliable as the only readiness check.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

After capture, confirm that the PNG exists and inspect it for the expected page sections, loaded images, overlays, and missing or clipped content. The screenshot method’s return value helps catch a file-writing error; it does not certify that the page rendered completely or that every browser configuration captured the document as expected.

Rank #3
Sale
Epson Workforce ES-400 II High-Speed Color Duplex Desktop Document Scanner | For Computers including PC and Mac with Auto Document Feeder and Image Adjustment Tools
  • FAST DOCUMENT SCANNING — Document scanner with feeder allows you to speed through stacks with a 50-sheet Auto Document Feeder (ADF); Efficient office scanner to help you scan more productively
  • INTUITIVE, HIGH-SPEED SOFTWARE — Quickly scan with this desktop document scanner; Epson ScanSmart Software lets you easily preview scans, email files, upload to the cloud, and more; Plus, automatic file naming saves even more time
  • SEAMLESS INTEGRATION — Easily incorporate your data into most document management software with the included TWAIN driver; Office document scanner integrates seamlessly with business workflows
  • EASY SHARING — Duplex scanner allows you to scan straight to email or popular cloud storage2 services like Dropbox, Evernote, Google Drive, and OneDrive for simple storage and sharing
  • SIMPLE FILE MANAGEMENT — Scanner allows the creation of searchable PDFs with Optical Character Recognition (OCR) and convert scans to editable Word or Excel files effortlessly; Designed for home and office document scanning

Browser and authentication limits

Full-page support depends on the binding and browser

The native full-document method described here is documented for Selenium’s Python Firefox WebDriver API. Do not assume the same method name or behavior works in Chrome, another language binding, or a remote Grid configuration. Check the API documentation for the exact combination you run.

Admin UI capture is different from REST API access

If you need a visual screenshot of wp-admin, use the authenticated browser session. The WordPress REST API authentication guide describes API authentication, while the REST API reference covers structured site data. API access may be the right choice for reading or changing data, but it does not render the admin interface for a visual screenshot. Cookie authentication applies when a user is logged in and has the appropriate capability.

Rank #4
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
  • Scanner type: Document
  • Connectivity technology: USB
  • With Auto Scan Mode, the scanner automatically detects what you're scanning
  • Digitize documents and images

Site-specific login controls can change the flow

Two-factor authentication, login plugins, redirects, and site policies can add steps or change selectors. The standard WordPress login documentation describes the normal flow, not every site customization. Automate only accounts and pages you are authorized to access.

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

Security and operational checks

  • Keep account passwords and session cookies out of source code, screenshots, logs, and shared output. Use a secret-handling approach appropriate to your environment rather than committing credentials.
  • Use HTTPS for login and API credentials. WordPress recommends HTTPS for secure authentication cookies and requires HTTPS by default for Application Password availability.
  • Limit the account to the capabilities needed for the target page, and avoid capturing or distributing sensitive admin information unnecessarily.
  • For repeatable captures, make the login state, readiness condition, output location, and browser/binding combination explicit so failures are diagnosable.

Troubleshooting

Symptom Likely cause What to check
The browser returns to the login page or the admin page redirects. Login did not complete, the session expired, or a site-specific redirect or policy intervened. Inspect the current URL and visible page after submission; verify credentials and complete any two-factor or plugin-controlled steps.
Selenium cannot find a login field. The site may use customized markup, a different login route, or an interstitial step. Inspect the actual form and update selectors and flow for that site rather than assuming the standard field IDs.
The screenshot is taken before a table or widget is ready. The wait condition only detects initial page structure, not the required asynchronous content. Wait for a selector or state that represents the specific content, and inspect the resulting image.
get_full_page_screenshot_as_file is unavailable. The installed binding, browser driver, or Selenium version may not expose the documented Firefox method. Verify your exact combination against its API documentation; the cited Python Firefox reference is for Selenium 4.50.0.
The method returns False or no file appears. The output path may be invalid or unwritable, or the file write failed. Use an absolute writable path, ensure its parent directory exists, and check both the return value and file existence.
Some page areas are absent or look incomplete. The page may not have finished rendering, or the capture behavior may differ in the chosen browser setup. Wait for the needed content, verify the output visually, and confirm full-page behavior for the specific binding and browser.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

For a screenshot of a URL that is publicly accessible to the capture service, ScreenshotNeo can return an image with one GET request. It is a website screenshot API and MCP server for developers; it is not a way to bypass a WordPress login. Do not send private admin credentials or session cookies unless your security requirements and configuration explicitly permit that.

Best Value
Sale
ScanSnap iX2500 Wireless or USB High-Speed Document Scanner, Black | Cloud Enabled | Photos & Receipts | Large Touchscreen | 100 page Auto Document Feeder | Mac or PC
  • OUR MOST ADVANCED SCANSNAP. Large touchscreen, fast 45ppm double-sided scanning, 100-sheet document feeder, Wi-Fi and USB connectivity, automatic optimizations, and support for cloud services. Upgraded replacement for the discontinued iX1600
  • CUSTOMIZABLE. SHARABLE. Select personalized profiles from the touchscreen. Send to PC, Mac, mobile devices, and clouds. QUICK MENU lets you quickly scan-drag-drop to your favorite computer apps
  • STABLE WIRELESS OR USB CONNECTION. Built-in Wi-Fi 6 for the fastest and most secure scanning. Connect to smart devices or cloud services without a computer. USB-C connection also available
  • PHOTO AND DOCUMENT ORGANIZATION MADE EFFORTLESS. Easily manage, edit, and use scanned data from documents, receipts, photos, and business cards. Automatically optimize, name, and sort files
  • AVOIDS PAPER JAMS AND DAMAGE. Features a brake roller system to feed paper smoothly, a multi-feed sensor that detects pages stuck together, and skew detection to prevent paper damage and data loss
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. An MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up for the free plan.

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.

FirefoxPythonscreenshotsSeleniumweb automationWordPress

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.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

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.