Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs(python): fix WebSocket types (#22155)
Max Schmitt590013e27b18
diff --git a/docs/src/api/class-websocket.md b/docs/src/api/class-websocket.mdindex 1441cb1a81..3b3308b885 100644--- a/docs/src/api/class-websocket.md+++ b/docs/src/api/class-websocket.md@@ -16,6 +16,11 @@ Fired when the websocket closes.Fired when the websocket receives a frame.+## event: WebSocket.frameReceived+* since: v1.9+* langs: python+- argument: <[string]|[Buffer]> frame payload+## event: WebSocket.frameReceived* since: v1.9* langs: csharp, java@@ -28,6 +33,11 @@ Fired when the websocket receives a frame.Fired when the websocket sends a frame.+## event: WebSocket.frameSent+* since: v1.9+* langs: python+- argument: <[string]|[Buffer]> frame payload+## event: WebSocket.frameSent* since: v1.9* langs: csharp, java@@ -35,7 +45,7 @@ Fired when the websocket sends a frame.## event: WebSocket.socketError* since: v1.9-- argument: <[String]>+- argument: <[string]>Fired when the websocket has an error.diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.tsindex 00fe441089..62a72a4ff2 100644--- a/packages/playwright-core/types/types.d.ts+++ b/packages/playwright-core/types/types.d.ts@@ -18721,7 +18721,7 @@ export interface WebSocket {/*** Fired when the websocket has an error.*/- on(event: 'socketerror', listener: (string: String) => void): this;+ on(event: 'socketerror', listener: (string: string) => void): this;/*** Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.@@ -18751,7 +18751,7 @@ export interface WebSocket {/*** Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.*/- once(event: 'socketerror', listener: (string: String) => void): this;+ once(event: 'socketerror', listener: (string: string) => void): this;/*** Fired when the websocket closes.@@ -18781,7 +18781,7 @@ export interface WebSocket {/*** Fired when the websocket has an error.*/- addListener(event: 'socketerror', listener: (string: String) => void): this;+ addListener(event: 'socketerror', listener: (string: string) => void): this;/*** Removes an event listener added by `on` or `addListener`.@@ -18811,7 +18811,7 @@ export interface WebSocket {/*** Removes an event listener added by `on` or `addListener`.*/- removeListener(event: 'socketerror', listener: (string: String) => void): this;+ removeListener(event: 'socketerror', listener: (string: string) => void): this;/*** Removes an event listener added by `on` or `addListener`.@@ -18841,7 +18841,7 @@ export interface WebSocket {/*** Removes an event listener added by `on` or `addListener`.*/- off(event: 'socketerror', listener: (string: String) => void): this;+ off(event: 'socketerror', listener: (string: string) => void): this;/*** Fired when the websocket closes.@@ -18871,7 +18871,7 @@ export interface WebSocket {/*** Fired when the websocket has an error.*/- prependListener(event: 'socketerror', listener: (string: String) => void): this;+ prependListener(event: 'socketerror', listener: (string: string) => void): this;/*** Indicates that the web socket has been closed.@@ -18931,7 +18931,7 @@ export interface WebSocket {/*** Fired when the websocket has an error.*/- waitForEvent(event: 'socketerror', optionsOrPredicate?: { predicate?: (string: String) => boolean | Promise<boolean>, timeout?: number } | ((string: String) => boolean | Promise<boolean>)): Promise<String>;+ waitForEvent(event: 'socketerror', optionsOrPredicate?: { predicate?: (string: string) => boolean | Promise<boolean>, timeout?: number } | ((string: string) => boolean | Promise<boolean>)): Promise<string>;}