Selenium / Quiz

Actions API: Hover, Drag, and Keyboard Combat

Menus that only open on hover, sliders that demand real drags, and Ctrl-clicks. The Actions class is the low-level input weapon, if you call perform().

Difficulty
Medium
Format
Quiz
Points
150
Estimate
10 min

// MISSION BRIEF

Your Mission

The new admin UI is a gesture minefield: hover-only menus, drag-to-reorder lists, shift-click multi-select. Element.click() gets you nowhere. Time to fight with the Actions API.

Seven questions on composed input: builders, modifiers, drag mechanics, and Selenium 4 scroll wheels. Speed bonus active.

// FIRST CONTACT

Battle teaser

new Actions(driver).moveToElement(menu).moveToElement(submenu).click(); executes nothing. Why?

  1. AActions requires headless mode off
  2. BmoveToElement cannot be chained twice
  3. CThe chain was never executed, composed actions run only when perform() is called
  4. Dclick() must come first in a chain
Answers, scoring, hints, and the full battle stay sealed.

// SKILL TAGS

seleniumactions-apidrag-and-dropkeyboardjava