title: Sending websocket requests via Pyppeteer
body: <p>I am using <a href="https://github.com/pyppeteer/pyppeteer" rel="nofollow noreferrer">pyppeteer</a> on Python to connect to a websocket and get data on a persistent manner and its working fine. Here's the code:</p>
  <pre><code>import asyncio
  from pyppeteer import launch
  
  async def main():
      browser = await launch(
          headless=False,
          #args=['--no-sandbox'],
          autoClose=True
      )
      page = await browser.newPage()
      await page.goto('https://pocketoption.com/en/cabinet/demo-quick-high-low')
      cdp = await page.target.createCDPSession()
      await cdp.send('Network.enable')
      await cdp.send('Page.enable')
  
      def printResponse(response):
          print(response)
  
      cdp.on('Network.webSocketFrameReceived', printResponse)  # Calls printResponse when a websocket is received
      cdp.on('Network.webSocketFrameSent', printResponse)  # Calls printResponse when a websocket is sent
      await asyncio.sleep(100)
  
  
  loop = asyncio.get_event_loop()
  loop.create_task(main())
  loop.run_forever()
  </code></pre>
  <p>But I also need to be able to send requests to the websocket session for a change in received payload like the requests given manually in chrome like the following image (click on a new asset and 4 requests are sent to the websocket):</p>
  <p><a href="https://i.stack.imgur.com/9Ax9u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9Ax9u.png" alt="enter image description here" /></a></p>
  <p>My question is: Is it possible to send these 4 requests to websocket using pyppeteer code?</p>