Answers for "how to scroll a page in selenium python repeadtly"

2

python selenium scroll all down

from selenium import webdriver
import time

browser = webdriver.Firefox()
browser.get("https://en.wikipedia.org")
browser.execute_script("window.scrollTo(0,document.body.scrollHeight)")
time.sleep(3)
browser.close()
Posted by: Guest on May-05-2020
0

selenium webdriver scroll down python

while driver.find_element_by_tag_name('div'):
    driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
    Divs=driver.find_element_by_tag_name('div').text
    if 'End of Results' in Divs:
        print 'end'
        break
    else:
        continue
Posted by: Guest on May-23-2020

Code answers related to "how to scroll a page in selenium python repeadtly"

Python Answers by Framework

Browse Popular Code Answers by Language