Skip to content
BENIBIX Learn

Selenium

Development🧪 Testing & QualityTest Frameworks

Also known as Selenium WebDriver, WebDriver, Selenium Grid

Tools that drive web browsers from code, in many languages.

Think of it like

Think of it like a remote that works with almost any TV. You use one remote for all of them.

Example

A bank's test team writes Selenium tests in Java. The same tests run on Chrome, Firefox and Edge each night.

Why it matters

It works with many languages and every big browser, so most teams can use it.

Definition

Selenium is a set of tools that drive web browsers from code. Its main part, WebDriver, controls a browser the way a person would. WebDriver is now an official web standard, so every big browser supports it. You can write Selenium tests in Java, Python, C#, Ruby, JavaScript and Kotlin. It is one of the oldest browser test tools. Many teams still use it.

Example code

python
from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get("https://example.com/login")
driver.find_element(By.NAME, "email").send_keys("emma@example.com")
driver.quit()
Open Chrome, load the login page, type an email, then close.
Selenium is the oldest of the three browser test tools.

Common mistake

Using fixed sleeps to wait for pages. Wait for the element instead, or tests turn flaky.

Key takeaways

  1. 1
    WebDriver. A web standard every browser supports.
  2. 2
    Many languages. Java, Python, C# and more.
  3. 3
    Many browsers. One test, several browsers.

Compare