Scroll an element into view
Medium70 pts~25 min
- Scrolling
- Viewport
Practice app · Profile Settings
A settings page for clicking, typing, reading text/attributes/CSS and element state.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Bring an element far below the fold into the viewport and verify it.
Your task
- 1Open TEST_URL.
- 2Locate
#scroll-target. - 3Scroll it into view with the Actions API (scrollToElement) or JavaScript
scrollIntoView(). - 4Assert it is displayed and reads “You scrolled here”.
Acceptance criteria
- The element is scrolled into view
#scroll-targetreads “You scrolled here”- At least 2 assertions pass
Selenium WebDriver 4 · QA Automation · Interactions