Scroll to Click

Clicking an element that is not currently visible in the viewport requires scrolling. Sometimes the element itself is inside a scrollable container. Other times a parent container must be scrolled first to bring the child container into view. A robust test must handle all these cases.

Scenario

Playground

Case 1 — Page Scroll

The button below is placed far down the page so it is out of the initial viewport.

↓ Scroll down to find the button ↓
Case 2 — Container Scroll

The button is hidden inside a scrollable container. You need to scroll within the container to reach it.

↘ Scroll right and down inside this box
Case 3 — Nested Scroll (Parent + Child)

The button is inside a nested scrollable structure. First scroll the outer container to reveal the inner one, then scroll the inner container to find the button.

↓ Scroll down in this outer container to find the inner box

→ Scroll right inside this inner box
Case 4 — Hover to Reveal

The button below is hidden until you hover over its parent row — similar to action buttons in email clients that only appear on hover.

Meeting notes - Q4 planning
Re: Project deadline update
Weekly status report
Invitation: Team lunch Friday
Buttons clicked: 0 / 4