title: Gatling: Cannot print a response from WebSocket server
body: <p>I'm using the following code in Gatling:</p>
  
  <pre><code>.exec(ws("Open WS connection")
        .open("/${session_id}/socket?device=other"))
        .pause(2)
  .exec(ws("Get client browser id")
        .sendText("[]")    
        .check(wsListen.within(10).until(1).jsonPath("$.[2]").saveAs("clientID")))
  </code></pre>
  
  <p>It does not report any failure. I assume it means that the JSON value was stored in the clientID variable successfully.
  When I add </p>
  
  <pre><code>.exec{
         session =&gt;
          println("clientID: " + session("clientID").as[String])
          session
      }
  </code></pre>
  
  <p>I get error</p>
  
  <p>[ERROR] i.g.c.a.b.SessionHookBuilder$$anon$1 - 'hook-1' crashed with 'java.util.NoSuchElementException: key not found: clientID', forwarding to the next one
  This call works in JMeter. 
  Please help. </p>