Scrolls down as a percentage of the page.
(self, amount=25)
| 3484 | self.loop.run_until_complete(self.page.wait(0.1)) |
| 3485 | |
| 3486 | def scroll_down(self, amount=25): |
| 3487 | """Scrolls down as a percentage of the page.""" |
| 3488 | try: |
| 3489 | self.loop.run_until_complete(self.page.scroll_down(amount)) |
| 3490 | except Exception: |
| 3491 | amount = self.get_window_size()["height"] * amount / 100 |
| 3492 | self.execute_script("window.scrollBy(0, %s);" % amount) |
| 3493 | self.loop.run_until_complete(self.page.wait(0.1)) |
| 3494 | |
| 3495 | def save_page_source(self, name, folder=None): |
| 3496 | from seleniumbase.core import log_helper |