Selenium WebDriver 4

Handle a tooltip on hover

Medium70 pts~25 min
  • Hover
  • Actions API
Practice app · UI Widgets Lab

Native alerts, confirm and prompt dialogs, a modal, a cookie banner, custom dropdown, autocomplete, date picker and tooltip.

Test URL
/lab/selenium-handle-a-tooltip-on-hover

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

Objective

Hover a trigger to reveal a tooltip and assert its text.

Your task

  1. 1Open TEST_URL.
  2. 2Move the mouse over #tooltip-trigger with the Actions API.
  3. 3Wait for #tooltip to be visible.
  4. 4Assert it reads “Tooltips explain things”.

Acceptance criteria

  • A hover action is used
  • The widgets page is open
  • At least 2 assertions pass

Selenium WebDriver 4 · Selenium · Dropdowns, alerts & popups