Table of Contents

Interface IWebSocket

Namespace
Microsoft.Playwright
Assembly
Microsoft.Playwright.dll

The IWebSocket class represents websocket connections in the page.

public interface IWebSocket

Properties

IsClosed

Indicates that the web socket has been closed.

bool IsClosed { get; }

Property Value

bool

Url

Contains the URL of the WebSocket.

string Url { get; }

Property Value

string

Events

Close

Fired when the websocket closes.

event EventHandler<IWebSocket> Close

Event Type

EventHandler<IWebSocket>

FrameReceived

Fired when the websocket receives a frame.

event EventHandler<IWebSocketFrame> FrameReceived

Event Type

EventHandler<IWebSocketFrame>

FrameSent

Fired when the websocket sends a frame.

event EventHandler<IWebSocketFrame> FrameSent

Event Type

EventHandler<IWebSocketFrame>

SocketError

Fired when the websocket has an error.

event EventHandler<string> SocketError

Event Type

EventHandler<string>