Loading new elements to findElements() ?


A webpage creates new divs and content into the page after scrolling all the way down.

How to find these new divs after they’re created? They weren’t hidden.

findElements() only shows old elements, not the ones just created.


Kerooker Default Asked on December 30, 2015 in Selenium WebDriver.
Add Comment
3 Answer(s)
Best answer

Before findingElements , Use Scroll method to scrolldown ( you can loop scroll down if data keeps on increasing once you scroll ) . I did it. It worked in  great way.

let me know if you need sample code.

sateeshpv Train Answered on December 31, 2015.
Add Comment

Would you provide me a sample code? I tried scrolling with

((JavascriptExecutor) driver).executeScript("scroll(0,250);");

but the new elements didn’t seem to load…

Kerooker Default Answered on December 31, 2015.
Add Comment


The right script was @sateeshpv’s, but I wasn’t scrolling down enough, that’s why it wasn’t working for me.


Kerooker Default Answered on January 1, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.