Skip to content
Advertisement

document.scrollingElement is not working . Not able to scroll down for inspecting elements

Please find the aatched screenshot.

and Below code is printing only first 4-5 rows which is visible in the screenshot. It is not scrolling down and inspecting element it is prining blank spaces.

Same code is running succesfully without i write code written in main function outside the function.

enter image description here

JavaScript

add_data.py ->

JavaScript

Advertisement

Answer

May be you need to scroll to each row to extract details. I added driver.execute_script("arguments[0].scrollIntoView(true);",elems[j]) in the code, and it extracted all the details. Try this once.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement