Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #selenium #webdriver #scroll #python
ADD COMMENT
Topic
Name
7+3 =