code: function extractSessionData (res) {
    var body;
  
    if (res.statusCode !== 200) {
      console.dir(res.headers);
      throw new Error('Failed to start a Selenium session. Server responded with status code ' + res.statusCode + ':\n' + res.body);
    }
  
    body = JSON.parse(res.body);
    if (body.status === 0) {
      return { sessionId: body.sessionId, capabilities: body.value };
    } else {
      throw new Error(errors.fromBody(body));
    }
  }
docs: ///////////// Utilities // ///////////// 
  Extract a session ID and the accepted capabilities from a server response
  
  @param {Object} res
  @return {Object} `{sessionId: String, capabilities: Object}`