playwright-python
playwright-python copied to clipboard
[internal] investigate flaky framereceived test
=================================== FAILURES ===================================
________ test_should_reject_wait_for_event_on_close_and_error[chromium] ________
page = <Page url='about:blank'>
ws_server = <tests.server.WebSocketServerServer object at 0x7fe40877a250>
@flaky
async def test_should_reject_wait_for_event_on_close_and_error(page, ws_server):
async with page.expect_event("websocket") as ws_info:
await page.evaluate(
"""port => {
window.ws = new WebSocket('ws://localhost:' + port + '/ws');
}""",
ws_server.PORT,
)
ws = await ws_info.value
> await ws.wait_for_event("framereceived")
tests/async/test_websocket.py:127: