title: Nightwatch - How to subscribe to CDP Events?
body: <p>As you may already know, Nightwatch 2 now includes methods for making calls to CDP protocol.</p>
  <p>So, I'm trying to capture network responses. I know that the &quot;Network&quot; target has to be enabled and also we have to subscribe a callback to the <code>Network.responseReceived</code> event. I've already done it in another framework tool, but I can't find any related example in the Nightwatch documentation that uses CDP events.</p>
  <p>At this point, I don't know which is the method that allows this subscription or where is it, is it in <code>browser.driver</code> or in <code>cdpConnection</code> objects?</p>
  <p>This is the code I'm currently trying:</p>
  <pre><code>module.exports = {
    '@tags': ['njs2-03'],
    async myTest (browser) {
      await browser.driver.sendAndGetDevToolsCommand('Network.enable')
      
      const cdpConnection = await browser.driver.createCDPConnection('page');
      cdpConnection._wsConnection.on('Network.responseReceived', entry =&gt; {
        console.log('ENTRY &gt;&gt;', entry)
      })
  
      await browser.url('https://duckduckgo.com/')
  
    }
  }
  </code></pre>
  <p>Any suggestion would be really helpful, Thanks!</p>