def test_sel(self):
    driver = self.driver
delay = 3
driver.get(self.base_url + '/search?q=stckoverflow&src=typd')
driver.find_element_by_link_text('All').click()
for i in range(1, 100):
    self.driver.execute_script(
        'window.scrollTo(0, document.body.scrollHeight);')
time.sleep(4)
html_source = driver.page_source
data = html_source.encode('utf-8')
if __name__ == '__main__':
    unittest.main()
очищать веб-сайты с бесконечной прокруткой