Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

🤖 Artificial Intelligence
☁️ Cloud and Infrastructure
💾 Data and Databases
💼 Professional Skills
🎯 Programming and Development
🔒 Security and Networking
📚 Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
© 2026 CheatGrid™. All rights reserved.
Privacy PolicyTerms of UseAboutContact

Selenium Cheat Sheet

Selenium Cheat Sheet

Back to Developer Tools
Updated 2026-04-29
Next Topic: Storybook Component Development Cheat Sheet

Selenium is an open-source browser automation framework that enables programmatic control of web browsers across multiple platforms and languages. Originally created in 2004, it has evolved into the de facto standard for web application testing and automation, with Selenium WebDriver conforming to the W3C WebDriver specification since 2018. At its core, Selenium allows you to locate elements on a page, interact with them just as a user would, and verify behavior—making it indispensable for end-to-end testing, web scraping, and repetitive browser tasks. The key mental model: Selenium doesn't "see" the page like a human does; it navigates the DOM tree, so mastering locators and understanding how pages load asynchronously are essential to writing robust, non-flaky automation.

What This Cheat Sheet Covers

This topic spans 22 focused tables and 218 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: WebDriver Initialization and SetupTable 2: Locator StrategiesTable 3: Element Interaction MethodsTable 4: Wait StrategiesTable 5: Actions Class (Mouse, Keyboard, and Scroll)Table 6: Select Class (Dropdown Handling)Table 7: JavaScript ExecutorTable 8: Navigation CommandsTable 9: Window and Frame HandlingTable 10: Alert HandlingTable 11: Browser Options and CapabilitiesTable 12: TimeoutsTable 13: Screenshots, Logs, and PrintTable 14: File UploadTable 15: Cookies and StorageTable 16: Selenium GridTable 17: Shadow DOMTable 18: Common ExceptionsTable 19: BiDirectional API (BiDi) and CDPTable 20: Page Object Model (POM) PatternTable 21: Best PracticesTable 22: Virtual Authenticator (WebAuthn Testing)

Table 1: WebDriver Initialization and Setup

MethodExampleDescription
ChromeDriver
from selenium import webdriver
driver = webdriver.Chrome()
• Launches a Chrome browser instance
• Selenium Manager auto-downloads the matching ChromeDriver since 4.6+.
FirefoxDriver
driver = webdriver.Firefox()
• Launches Firefox using GeckoDriver
• supports full Selenium features.
EdgeDriver
driver = webdriver.Edge()
• Launches Microsoft Edge (Chromium-based)
• requires matching EdgeDriver version.
SafariDriver
driver = webdriver.Safari()
• Launches Safari on macOS using built-in safaridriver
• enable first with safaridriver --enable in terminal.
Selenium Manager
Automatic in Selenium 4.6+
• Automatically downloads and manages browser drivers without manual setup
• enabled by default in Selenium 4.6+.

More in Developer Tools

  • RStudio Cheat Sheet
  • Storybook Component Development Cheat Sheet
  • AI-LLM Code Generation Cheat Sheet
  • Docker Desktop for Developers Cheat Sheet
  • Jupyter Notebooks Cheat Sheet
  • Sublime Text Cheat Sheet
View all 55 topics in Developer Tools