Click at the current mouse position.
(page: Page)
| 1011 | |
| 1012 | |
| 1013 | def execute_click_current(page: Page) -> None: |
| 1014 | """Click at the current mouse position.""" |
| 1015 | locators = page.locator("*:focus") |
| 1016 | if not locators.count(): |
| 1017 | for frame in page.frames[1:]: |
| 1018 | locators = frame.locator("*:focus") |
| 1019 | if locators.count(): |
| 1020 | break |
| 1021 | locators.click() |
| 1022 | |
| 1023 | |
| 1024 | async def aexecute_click_current(page: APage) -> None: |