(direction: str, page: Page)
| 773 | |
| 774 | @beartype |
| 775 | def execute_scroll(direction: str, page: Page) -> None: |
| 776 | # perform the action |
| 777 | # code from natbot |
| 778 | if direction == "up": |
| 779 | page.evaluate( |
| 780 | "(document.scrollingElement || document.body).scrollTop = (document.scrollingElement || document.body).scrollTop - window.innerHeight;" |
| 781 | ) |
| 782 | elif direction == "down": |
| 783 | page.evaluate( |
| 784 | "(document.scrollingElement || document.body).scrollTop = (document.scrollingElement || document.body).scrollTop + window.innerHeight;" |
| 785 | ) |
| 786 | |
| 787 | |
| 788 | @beartype |
no test coverage detected