fix Runtime.enable race condition with event-based synchronization
Replace arbitrary sleep(200ms) with proper wait for Runtime.executionContextCreated event in the relay server. This ensures pages are fully ready before Runtime.enable returns to Playwright, fixing intermittent 'page not found' errors.
This commit is contained in:
@@ -1586,13 +1586,13 @@ describe('MCP Server Tests', () => {
|
||||
expect(normalized).toMatchInlineSnapshot(`
|
||||
{
|
||||
"cssLayoutViewport": {
|
||||
"clientHeight": 528,
|
||||
"clientHeight": 720,
|
||||
"clientWidth": 1280,
|
||||
"pageX": 0,
|
||||
"pageY": 0,
|
||||
},
|
||||
"cssVisualViewport": {
|
||||
"clientHeight": 528,
|
||||
"clientHeight": 720,
|
||||
"clientWidth": 1280,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
@@ -1603,13 +1603,13 @@ describe('MCP Server Tests', () => {
|
||||
},
|
||||
"devicePixelRatio": 1,
|
||||
"layoutViewport": {
|
||||
"clientHeight": 528,
|
||||
"clientHeight": 720,
|
||||
"clientWidth": 1280,
|
||||
"pageX": 0,
|
||||
"pageY": 0,
|
||||
},
|
||||
"visualViewport": {
|
||||
"clientHeight": 528,
|
||||
"clientHeight": 720,
|
||||
"clientWidth": 1280,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
|
||||
Reference in New Issue
Block a user