MCPcopy
hub / github.com/microsoft/playwright-python / evaluate

Function evaluate

tests/async/test_popup.py:345–354  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

343 evaluate_task: Optional[asyncio.Future] = None
344
345 async def evaluate() -> None:
346 nonlocal evaluate_task
347 evaluate_task = asyncio.create_task(
348 page.evaluate(
349 """() => {
350 const win = window.open('')
351 win.alert('hello')
352 }"""
353 )
354 )
355
356 [popup, dialog, _] = await asyncio.gather(
357 page.wait_for_event("popup"), context.wait_for_event("dialog"), evaluate()

Callers 1

Calls 1

evaluateMethod · 0.45

Tested by

no test coverage detected