Repaso
EspaƱol
TestingCoreTST-32

What is Selenium WebDriver?

Options

  1. A library that drives a real browser from code (Correct option)
  2. A database in which test results are stored
  3. A CSS framework that is used to style reports
  4. A Java build tool that compiles and runs tests

Answer

A library that controls a real web browser (click, type, read) from code to automate UI tests, using drivers such as ChromeDriver

Why

Selenium automates browsers. Your test code (Java, Python, JS...) sends commands to a driver (ChromeDriver, GeckoDriver), which controls a real browser: open a URL, find elements, click, type, and check the text on screen.

Used for end-to-end (E2E) UI tests that check complete user flows (login, checkout).

Selenium Manager (built in since 4.6) downloads the right driver automatically.

WebDriver driver = new ChromeDriver();
driver.get("https://example.com/login");
driver.findElement(By.id("email")).sendKeys("ana@example.com");
driver.findElement(By.cssSelector("button[type=submit]")).click();
driver.quit();

Remember

Selenium = code that drives a real browser.

Key terms

Practice this question in Repaso