Download Latest Version v1.51.0 source code.tar.gz (4.1 MB)
Email in envelope

Get an email when there's a new version of Playwright for .NET

Home / v1.48.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2024-10-21 1.7 kB
v1.48.0 source code.tar.gz 2024-10-21 4.1 MB
v1.48.0 source code.zip 2024-10-21 5.1 MB
Totals: 3 Items   9.1 MB 0

WebSocket routing

New methods Page.RouteWebSocketAsync() and BrowserContext.RouteWebSocketAsync() 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".

:::csharp
await page.RouteWebSocketAsync("/ws", ws => {
  ws.OnMessage(message => {
    if (message.Text == "request")
      ws.Send("response");
  });
});

See WebSocketRoute for more details.

UI updates

  • New "copy" buttons for annotations and test location in the HTML report.
  • Route method calls like Foute.FulfillAsync() are not shown in the report and trace viewer anymore. You can see which network requests were routed in the network tab instead.
  • New "Copy as cURL" and "Copy as fetch" buttons for requests in the network tab.

Miscellaneous

Browser Versions

  • Chromium 130.0.6723.19
  • Mozilla Firefox 130.0
  • WebKit 18.0

This version was also tested against the following stable channels: - Google Chrome 129 - Microsoft Edge 129

Source: README.md, updated 2024-10-21