(page: Page, server: Server)
| 385 | |
| 386 | |
| 387 | async def test_should_specify_location(page: Page, server: Server) -> None: |
| 388 | await page.goto(server.PREFIX + "/input/textarea.html") |
| 389 | lastEvent = await captureLastKeydown(page) |
| 390 | textarea = await page.query_selector("textarea") |
| 391 | assert textarea |
| 392 | |
| 393 | await textarea.press("Digit5") |
| 394 | assert await lastEvent.evaluate("e => e.location") == 0 |
| 395 | |
| 396 | await textarea.press("ControlLeft") |
| 397 | assert await lastEvent.evaluate("e => e.location") == 1 |
| 398 | |
| 399 | await textarea.press("ControlRight") |
| 400 | assert await lastEvent.evaluate("e => e.location") == 2 |
| 401 | |
| 402 | await textarea.press("NumpadSubtract") |
| 403 | assert await lastEvent.evaluate("e => e.location") == 3 |
| 404 | |
| 405 | |
| 406 | async def test_should_press_enter(page: Page) -> None: |
nothing calls this directly
no test coverage detected