Selenium / Quiz

Selenium in Java: The 4.x Dialect

Duration-based waits, Options over DesiredCapabilities, getDomAttribute vs getAttribute. Six questions that separate Selenium 4 Java from copy-pasted 2018 answers.

Difficulty
Medium
Format
Quiz
Points
150
Estimate
9 min

// MISSION BRIEF

Your Mission

The codebase compiles against Selenium 4.20 but half the snippets were pasted from old Stack Overflow. Deprecation warnings everywhere, one compile error, and a subtle attribute bug.

Six questions on writing the current Java dialect. Speed bonus active.

// FIRST CONTACT

Battle teaser

The Selenium 4 way to construct an explicit wait in Java:

  1. Anew WebDriverWait(driver, 10) still compiles on current versions
  2. Bnew WebDriverWait(10, driver)
  3. CWebDriverWait.of(driver).seconds(10)
  4. Dnew WebDriverWait(driver, Duration.ofSeconds(10))
Answers, scoring, hints, and the full battle stay sealed.

// SKILL TAGS

seleniumjavawebdriverapiui-automation