(page: Page)
| 100 | |
| 101 | |
| 102 | async def test_should_work_with_modifiers(page: Page) -> None: |
| 103 | await page.set_content("hello world") |
| 104 | alt_key_promise = asyncio.create_task( |
| 105 | page.evaluate( |
| 106 | """() => new Promise(resolve => { |
| 107 | document.addEventListener('touchstart', event => { |
| 108 | resolve(event.altKey); |
| 109 | }, {passive: false}); |
| 110 | })""" |
| 111 | ) |
| 112 | ) |
| 113 | await asyncio.sleep(0) # make sure the evals hit the page |
| 114 | await page.evaluate("""() => void 0""") |
| 115 | await page.tap("body", modifiers=["Alt"]) |
| 116 | assert await alt_key_promise is True |
| 117 | |
| 118 | |
| 119 | async def test_should_send_well_formed_touch_points(page: Page) -> None: |
nothing calls this directly
no test coverage detected