Skip to content Skip to sidebar Skip to footer

Web Element "Grows" After Being Scrolled Into View

I recently posted a question on SO where I observed a different element height and width being returned by Chrome Inspector tool vs. Selenium WebDriver when calling element.getSize

Solution 1:

Amazon product pages are quite complex, and include a lot of lazy-loaded images and other elements. It's likely that your element is growing in size because new content is being rendered lazily as you scroll down the page.

To answer your question, you will certainly need to scroll down the entire page and allow all elements to finish rendering if you want completely accurate dimensions.


Post a Comment for "Web Element "Grows" After Being Scrolled Into View"