Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/
For scroll down:
WebDriver driver = new FirefoxDriver(); JavascriptExecutor jse = (JavascriptExecutor)driver; jse.executeScript("window.scrollBy(0,250)", "");
or, you can do as follows:
jse.executeScript("scroll(0, 250);");
for scrolling up:
jse.executeScript("scroll(250, 0)");
This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!
1.4k questions
1.6k answers
866 comments
1.9k users