2022-09-11 13:44:25 +08:00
|
|
|
=== Websocket
|
|
|
|
|
|
|
|
--- add
|
|
|
|
|
2023-01-04 18:47:23 +08:00
|
|
|
goto "http://localhost:4200"
|
2022-09-11 13:44:25 +08:00
|
|
|
|
|
|
|
find:
|
2023-01-04 18:47:23 +08:00
|
|
|
[label "New Request"] [img] = plus [img]
|
2022-09-11 13:44:25 +08:00
|
|
|
|
|
|
|
plus -> hover
|
2023-01-04 18:47:23 +08:00
|
|
|
wait
|
2022-09-11 13:44:25 +08:00
|
|
|
|
|
|
|
find:
|
2023-01-04 18:47:23 +08:00
|
|
|
[label "HTTP"]
|
|
|
|
[label "Websocket"] = ws
|
2022-09-11 13:44:25 +08:00
|
|
|
|
|
|
|
ws -> click
|
|
|
|
|
|
|
|
find:
|
2023-01-04 18:47:23 +08:00
|
|
|
[input] = urlInput [button "Connect"] = connect
|
2022-09-11 13:44:25 +08:00
|
|
|
|
2023-01-04 18:47:23 +08:00
|
|
|
urlInput -> "wss://echo-websocket.hoppscotch.io"
|
2022-09-11 13:44:25 +08:00
|
|
|
connect -> click
|
|
|
|
|
2023-01-04 18:47:23 +08:00
|
|
|
wait 5000
|
2022-09-11 13:44:25 +08:00
|
|
|
|
|
|
|
find:
|
2023-01-04 18:47:23 +08:00
|
|
|
[button "Disconnect"] = disconnect
|
2022-09-11 13:44:25 +08:00
|
|
|
|
2023-01-04 18:47:23 +08:00
|
|
|
disconnect -> click
|
2022-09-11 13:44:25 +08:00
|
|
|
|
2023-01-04 18:47:23 +08:00
|
|
|
find:
|
|
|
|
[label "Disconnect from wss://echo-websocket.hoppscotch.io"] = disconnectSuccess
|
|
|
|
[label "Connected to wss://echo-websocket.hoppscotch.io"] = connectSuccess
|
2022-09-11 13:44:25 +08:00
|
|
|
|
2023-01-04 18:47:23 +08:00
|
|
|
# check history
|
2022-09-11 13:44:25 +08:00
|
|
|
|
2023-01-04 18:47:23 +08:00
|
|
|
find:
|
|
|
|
[img] [img] = historyIcon [label "New Request"] = newRequest
|
2022-09-11 13:44:25 +08:00
|
|
|
|
2023-01-04 18:47:23 +08:00
|
|
|
newRequest -> click
|
|
|
|
historyIcon -> click
|
2022-09-11 13:44:25 +08:00
|
|
|
|
2023-01-04 18:47:23 +08:00
|
|
|
find:
|
|
|
|
[label "History"]
|
|
|
|
[label "wss://echo-websocket.hoppscotch.io"] = targetHistory
|
|
|
|
|
|
|
|
targetHistory -> click
|
|
|
|
|
|
|
|
find:
|
|
|
|
[label "Disconnect from wss://echo-websocket.hoppscotch.io"] = disconnectSuccess
|
|
|
|
[label "Connected to wss://echo-websocket.hoppscotch.io"] = connectSuccess
|