Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do I get Websocket instance from Chrome network tab through Puppeteer, or is it even possible? This is what I mean, image.

What I have tried:

I'm aware of Chrome DevTools Protocol and it's events, so I know that I can listen to websocket messages, but I would like to manually control the "instance", e.g what will browser send as a response to server. Any other idea is more than welcomed.
Posted
Updated 20-Jan-20 0:08am

QueryObjects can be used in the command line API and also in Puppeteer in order to find the instance.
 
Share this answer
 
v2
Comments
hunglmht 6-Jan-21 12:30pm    
it works. thanks :v

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900