Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs: add backlink from WebSocket to WebSockeRoute (#34600)

Max Schmitt96d4dc1eda76
diff --git a/docs/src/api/class-websocket.md b/docs/src/api/class-websocket.md
index 3b3308b885..e33740eaca 100644
--- a/docs/src/api/class-websocket.md
+++ b/docs/src/api/class-websocket.md
@@ -1,7 +1,9 @@
# class: WebSocket
* since: v1.8
-The [WebSocket] class represents websocket connections in the page.
+The [WebSocket] class represents WebSocket connections within a page. It provides the ability to inspect and manipulate the data being transmitted and received.
+
+If you want to intercept or modify WebSocket frames, consider using [WebSocketRoute].
## event: WebSocket.close
* since: v1.8
diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts
index a150fdacd6..7d4c4b09b2 100644
--- a/packages/playwright-core/types/types.d.ts
+++ b/packages/playwright-core/types/types.d.ts
@@ -21301,8 +21301,11 @@ export interface WebError {
}
/**
- * The [WebSocket](https://playwright.dev/docs/api/class-websocket) class represents websocket connections in the
- * page.
+ * The [WebSocket](https://playwright.dev/docs/api/class-websocket) class represents WebSocket connections within a
+ * page. It provides the ability to inspect and manipulate the data being transmitted and received.
+ *
+ * If you want to intercept or modify WebSocket frames, consider using
+ * [WebSocketRoute](https://playwright.dev/docs/api/class-websocketroute).
*/
export interface WebSocket {
/**