Scroll problems with Selenium

I want to scroll the page ((JavascriptExecutor)driver) in selenium.but its not scroll its will shows the array index out of bound exception

 driver.get("https://www.justdial.com/Coimbatore");
		 ((JavascriptExecutor)driver).executeScript("scroll(0,500)");
		 List<WebElement> d=driver.findElements(By.className("store-name"));
		 System.out.println(d.size());
		 for(int i=0;i<=d.size();i++){
		 System.out.println(d.get(i).getText());
		}

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.