Selenium WebDriver 4

Click and hold, then release

Medium70 pts~25 min
  • Actions API
  • Click and hold
Practice app · Board Planner

Hover menus, drag and drop, context menu, click-and-hold and keyboard shortcuts.

Test URL
/lab/selenium-click-and-hold-then-release

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Press and hold the archive button for more than one second, then release it.

Your task

  1. 1Locate #hold-button.
  2. 2Build an Actions chain: clickAndHold(#hold-button), pause about 1.2 s, release(), perform().
  3. 3Assert #hold-result reads “Held for 1s+”.

Acceptance criteria

  • clickAndHold and release are used
  • #hold-result shows “Held for 1s+”
  • At least 1 assertion passes

Selenium WebDriver 4 · Selenium · Mouse & keyboard actions