From the course: Selenium Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Scroll to element

Scroll to element

- [Instructor] In this video, let's automate a page element that requires scrolling it into view. When automating a long form or page with lots of content, it can be necessary to scroll to the element to be tested. On this scroll page, we see lots of text and after scrolling down a bit to the bottom of the page, there are two fields at the end to enter name and date. Let's automate a test to scroll these text fields into view and then send values to them. From the IntelliJ welcome menu, I will select to open the exercise files for this video. At 02_04, I will select to open the start directory. Once the project is open, I will start by building by selecting build and build project. And once that is successful, I will focus on the scroll to element test class. Just like the test classes in previous videos, this test class just contains the basics to get started by setting the location to the chrome driver, creating a new instance of the chrome driver, navigating the driver to the…

Contents