WebSocketReadyState
Add the following line to your scenario code to use the enum:
require(Modules.WebSocket);
Constants
CLOSED
Connection is closed or cannot be opened.
CLOSING
Connection is closing.
CONNECTING
Connection is in the process.
OPEN
Connection is open and ready to communicate.