I need to select a image which appears on scrolling down a page. Set of images loads on hitting bottom of page and further scrolling down loads another set of images.
I tried using scroll(), scrollBy() and Actions method but none is responding. But using scrollIntoView() method alone scrolls the page. since the image i needed to select appears only after loading on scroll is completed, i couldn't use scrollIntoView() here . Please note scroll window im trying is inside iframe and div tag.
((JavascriptExecutor) driver).executeScript("scroll(0,400)");
((JavascriptExecutor) driver).executeScript("window.scrollBy(0,250)", "");
Actions action = new Actions(driver);
action.sendKeys(Keys.PAGE_DOWN);