Click at the current mouse position.
(page: APage)
| 876 | |
| 877 | @beartype |
| 878 | async def aexecute_click_current(page: APage) -> None: |
| 879 | """Click at the current mouse position.""" |
| 880 | locators = page.locator("*:focus") |
| 881 | locator_count = await locators.count() |
| 882 | if not locator_count: |
| 883 | for frame in page.frames[1:]: |
| 884 | locators = frame.locator("*:focus") |
| 885 | locator_count = await locators.count() |
| 886 | if locator_count: |
| 887 | break |
| 888 | await locators.click() |
| 889 | await page.wait_for_load_state("load") |
| 890 | |
| 891 | |
| 892 | @beartype |
no test coverage detected