Scrolls up as a percentage of the page.
(self, amount=25)
| 3475 | self.loop.run_until_complete(self.page.wait(0.1)) |
| 3476 | |
| 3477 | def scroll_up(self, amount=25): |
| 3478 | """Scrolls up as a percentage of the page.""" |
| 3479 | try: |
| 3480 | self.loop.run_until_complete(self.page.scroll_up(amount)) |
| 3481 | except Exception: |
| 3482 | amount = self.get_window_size()["height"] * amount / 100 |
| 3483 | self.execute_script("window.scrollBy(0, -%s);" % amount) |
| 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.""" |
nothing calls this directly
no test coverage detected