Click at the current mouse position.
(page: APage)
| 1022 | |
| 1023 | |
| 1024 | async def aexecute_click_current(page: APage) -> None: |
| 1025 | """Click at the current mouse position.""" |
| 1026 | locators = page.locator("*:focus") |
| 1027 | locator_count = await locators.count() |
| 1028 | if not locator_count: |
| 1029 | for frame in page.frames[1:]: |
| 1030 | locators = frame.locator("*:focus") |
| 1031 | locator_count = await locators.count() |
| 1032 | if locator_count: |
| 1033 | break |
| 1034 | await locators.click() |
| 1035 | await page.wait_for_load_state("load") |
| 1036 | |
| 1037 | |
| 1038 | def execute_type(keys: list[int], page: Page) -> None: |