- Eclipse IDE: Before downloading also make sure that your device has Java JDK. If you don’t have, install Java refers to this: How to Download and Install Java for 64-bit machine?. And install Eclipse IDE by referring to this article Eclipse IDE for Java Developers
- Selenium: Download the Selenium latest stable version here
- Web Driver: Download the Microsoft Edge webdriver according to your version here
- Scroll Down to the bottom of the page:
let us consider a test case in which we will try to automate the following scenarios in the Edge browser.
- Launch the Edge browser
- Maximize the browser.
- Open URL: https://www.geeksforgeeks.org/
Step 1: Set a system property “webdriver.edge.driver” to the path of your EdgeDriver.exe file and instantiate an EdgeDriver class.
Step 2: Maximize the window: driver.manage().window().maximize() and open the geeksforgeeks site.
Example: Program to scroll down to the bottom of the webpage using Selenium:
The above code starts the Edge browser and navigates to the geeksforgeeks page, once the webpage loads, Selenium automatically fetches the maximum height of the webpage from the Document Object Model, and then the scrollBy() method scrolls down to the bottom.
Please Login to comment...