MCPcopy Index your code
hub / github.com/microsoft/playwright-python / test_double_click_the_button

Function test_double_click_the_button

tests/async/test_click.py:354–366  ·  view source on GitHub ↗
(page: Page, server: Server)

Source from the content-addressed store, hash-verified

352
353
354async def test_double_click_the_button(page: Page, server: Server) -> None:
355 await page.goto(server.PREFIX + "/input/button.html")
356 await page.evaluate(
357 """() => {
358 window.double = false;
359 button = document.querySelector('button');
360 button.addEventListener('dblclick', event => window.double = true);
361 }"""
362 )
363
364 await page.dblclick("button")
365 assert await page.evaluate("double")
366 assert await page.evaluate("result") == "Clicked"
367
368
369async def test_click_a_partially_obscured_button(page: Page, server: Server) -> None:

Callers

nothing calls this directly

Calls 3

gotoMethod · 0.45
evaluateMethod · 0.45
dblclickMethod · 0.45

Tested by

no test coverage detected