I am trying to scroll to the end so that I can make all the data visible and extract it. I tried to find a command for it, but it is available in java (driver.executeScript) but not found for python. Now I make the computer press the end key a thousand times:
while i<1000: scroll = driver.find_element_by_tag_name('body').send_keys(Keys.END) i+=1
And I also tried driver.execute_script ("window.scrollTo (0, document.body.scrollHeight);"), but it scrolls to the end of the loaded page and the same END key. As soon as the following content is loaded at the bottom of the page. But now it does not scroll again.
I know there will be a very good alternative for this. Please help.
source share