You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ws("Subscribe for updates")
.sendText("")
.await(10.seconds)(check1, ..., checkN)
In other words, you can create many checks with a method and a loop, but it has to be a finite loop with a fixed number of iterations.
A typical scenario for a websocket test is to subscribe to an infinite stream of updates on some event type (e.g. account update) and then perform checks on the received messages - something akin to
ws("Subscribe for updates")
.sendText("")
.during(10.seconds)(check) // keep consuming messages for 10 seconds, perform check