Press a key.
(key: str, page: APage)
| 956 | |
| 957 | |
| 958 | async def aexecute_key_press(key: str, page: APage) -> None: |
| 959 | """Press a key.""" |
| 960 | if "Meta" in key and "Mac" not in await page.evaluate( |
| 961 | "navigator.platform" |
| 962 | ): |
| 963 | key = key.replace("Meta", "Control") |
| 964 | await page.keyboard.press(key) |
| 965 | |
| 966 | |
| 967 | def execute_mouse_hover(left: float, top: float, page: Page) -> None: |