MyGit

v1.48.0

microsoft/playwright

版本发布时间: 2024-10-08 20:59:42

microsoft/playwright最新发布版本:v1.49.0(2024-11-19 02:33:25)

WebSocket routing

New methods page.routeWebSocket() and browserContext.routeWebSocket() allow to intercept, modify and mock WebSocket connections initiated in the page. Below is a simple example that mocks WebSocket communication by responding to a "request" with a "response".

await page.routeWebSocket('/ws', ws => {
  ws.onMessage(message => {
    if (message === 'request')
      ws.send('response');
  });
});

See WebSocketRoute for more details.

UI updates

Miscellaneous

Browser Versions

This version was also tested against the following stable channels:

相关地址:原始地址 下载(tar) 下载(zip)

查看:2024-10-08发行的版本