Pages

Topics

Tools

↑↓navigate↵openescclose

Python guides

Every published Python guide, newest first, with practical examples you can copy into your own project.

3,965 guides across 14 topics

Topics

Latest Python guides

Diagram showing Playwright navigation wait states and load state options.
Python

Python Playwright Waits: Navigation and Load States

python playwright waits navigation and load states: Learn how to wait for navigation and load states in Python Playwright, including load state options, explicit waits...

PlaywrightPythonWeb AutomationTesting
Technical illustration showing how Playwright locators target web elements using CSS selectors, XPath expressions, and text-based matching.
Python

Python Playwright CSS Selector, XPath, and Text Locators

Learn how to locate elements in Python Playwright with CSS selectors, XPath, and text-based locators, and choose the right locator strategy.

playwrightpythonweb automationcss selectors
A browser window with a crosshair locator cursor targeting a button and a text input field, representing Playwright click and fill automation.
Python

Python Playwright Browser Page Locator: Click and Fill

python playwright browser page locator click and fill: Learn to use Playwright's Python locator API to click elements and fill form inputs, covering auto-waiting, stri...

PlaywrightPythonBrowser AutomationLocators
A visual comparison of Selenium and Playwright browser automation frameworks in Python, showing two browser windows with code snippets.
Python

Python Selenium vs Playwright: A Practical Comparison

Compare Python Selenium and Playwright for browser automation: API style, auto-waiting, browser support, debugging tools, and when to choose each.

SeleniumPlaywrightBrowser AutomationWeb Testing
A diagram showing a Selenium WebDriver pointing to a web element that becomes stale, with a retry loop and wait condition.
Python

Python Selenium: Fixing Stale Element and NoSuchElement Errors

Learn why Python Selenium raises StaleElementReferenceException and NoSuchElementException, and how to fix them with explicit waits, retries, and stable locators.

SeleniumPythonWeb AutomationError Handling
Illustration of a browser window with a scroll bar and a loading spinner at the bottom, representing Selenium JavaScript execution for infinite scroll.
Python

Python Selenium JavaScript Execution for Scroll and Infinite Scroll

python selenium javascript execution scroll and infinite scroll: Learn how to execute JavaScript in Selenium to scroll through infinite scroll pages, wait for dynamic...

SeleniumWeb ScrapingJavaScript ExecutionInfinite Scroll
Illustration of a Selenium WebDriver automating file upload, download, and screenshot capture in a browser.
Python

Python Selenium: File Upload, Download, and Screenshots

Learn how to automate file uploads, manage downloads, and capture screenshots with Python Selenium WebDriver.

seleniumpythonweb automationfile upload
Illustration of a headless Chrome browser window with a user agent label and proxy server connection in a Python Selenium context.
Python

Python Selenium Headless Chrome: User Agent and Proxy

Configure Selenium headless Chrome with a custom user agent and proxy in Python. Learn how to set Chrome options, handle proxy authentication, and diagnose common failures.

SeleniumHeadless ChromeUser AgentProxy
Illustration of a Selenium browser session with a cookie jar representing saved login credentials for automation.
Python

Python Selenium Cookies for Login Session Automation

Save Selenium cookies after login, restore them in later runs, and handle expiry, domain restrictions, and re-authentication.

SeleniumWeb AutomationCookiesSession Management
Illustration of a Selenium WebDriver switching between an iframe, a browser tab, and a JavaScript alert dialog, representing context management in browser automation.
Python

Python Selenium: Iframes, Tabs, Windows, and Alerts

Learn how to switch between iframes, browser tabs, and JavaScript alerts in Python Selenium. This guide includes practical code examples, common failure modes, and production tips.

SeleniumWeb AutomationIframesBrowser Tabs