(direction: str, page: APage)
| 787 | |
| 788 | @beartype |
| 789 | async def aexecute_scroll(direction: str, page: APage) -> None: |
| 790 | # perform the action |
| 791 | # code from natbot |
| 792 | if direction == "up": |
| 793 | await page.evaluate( |
| 794 | "(document.scrollingElement || document.body).scrollTop = (document.scrollingElement || document.body).scrollTop - window.innerHeight;" |
| 795 | ) |
| 796 | elif direction == "down": |
| 797 | await page.evaluate( |
| 798 | "(document.scrollingElement || document.body).scrollTop = (document.scrollingElement || document.body).scrollTop + window.innerHeight;" |
| 799 | ) |
| 800 | |
| 801 | |
| 802 | @beartype |
no test coverage detected