WebSocket Send Message Item


WebSocket Send Message item makes a request for sending some data to the open WebSocket connection. Every WebSocket Send Message item is tied to the certain WebSocket Connection item. In a special combo-box you can choose the necessary connection item.

WebSocket requests and responses may consist of several messages coming one after another. WAPT collects all messages of request/response to one message.

WebSocket Send Message items have all the necessary attributes for specification of one message being sent. Message body can be either text, or binary depending on the type of message. In case of binary type, message body is similar to the body of binary request. In both cases (text and binary) you can use variables.

When WAPT processes the received message, it first calculates the variables common for WebSocket Connection item. Then it calculates the variables of the last sent WebSocket Send Message item. If some function returns an error, you can keep an old value of variable. Check the option "Do not assign value, if any of the above functions returns an error" in the "Add Variable" dialog for this purpose.

User Interface of WebSocket Send Message Items


Parameters of WebSocket Send Message items are displayed on 2 tabs: Properties and Response processing.

On the Properties tab you can specify the item name. Item type can be either Binary, Text, or JSON. Representation of data for sending is different for these types of items.

Here is an example of Binary item:



Text item:



JSON item:



Response processing tab of WebSocket Send Message items is similar to WebSocket Connection items.
Variables are calculated after receiving a response to the current message.

Recorded Messages tab shows one sent message and all received messages (received before the next sending). This tab contains all information about the recorded message. For binary messages you can see their ASCII text representation.

Received messages are shown on the green background .

Sent messages are shown on the blue background .

Messages of the same type going one after another are shown with different tones of the same color.



Next page