-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do we have a document or example on how to use some events like Network.responseReceived
...
#2675
Comments
Network.responseReceived
Network.responseReceived
...
Since these are normal CDP events, you can use the CDP documentation: https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-loadingFailed And our CDP example (client.on): https://playwright.dev/#version=v1.1.1&path=docs%2Fapi.md&q=class-cdpsession |
Overall, Playwright discourages the direct use of CDP. Our goal is to be vendor independent while CDP limits your tests to Chromium only. It is useful for us to know when something is missing in the Playwright API so that we could expose it universally for all the browsers. Could you share what you are trying to do? Events that you lost all bubble up through the Playwright API... |
I'm trying to port my existing project which written by puppeteer to playwright so I need to do some code transformation cause the difference. |
@phileba Interesting! Did you rely on CDP in your puppeteer project as well? |
can we do something like await the promise if we receive json file which url matches with regex? Personally I do it with Most of the time while working i must rely on cdp like working on websockets etc :( |
@shirshak55 WebSockets are missing indeed - I created a separate FR to track the progress there. Is there anything else that's missing?
@shirshak55 chances are, it works in Playwright! I'd highly recommend trying it out. If something doesn't work indeed, please let us know - we'd be happy to fix it. |
yep, there are some places which I'm using CDP and 1 of them is #2704 |
@phileba : https://chromedevtools.github.io/devtools-protocol/ is the best source of info on CDP. You have a CDP sessions, so you can enable agents and communicate with the browser. Explaining how to work with CDP is outside of the scope of Playwright, so sadly you are on ypur own there. I will comment on your hightlight bug separately! |
Do we have a document or example on how to use some event likes
The text was updated successfully, but these errors were encountered: