[Feature] add `connection()` to `CDPSession` to maintain parity with Puppeteer
See original GitHub issueToday I was messing around with the new Lighthouse User Flow api which is written to use puppeteer.
I managed to hack things together to the point where it would work (note I’ve only tried flow.navigate
) and one of the things I ran into was the lack of connection()
on CDPSession
. I’m sure there’s a good reason why it’s not there but for my own sanity I wish it were 😅
The discussion I had with the lighthouse folks has more details on what was required to get things to work
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:9 (4 by maintainers)
Top Results From Across the Web
CDPSession class - Puppeteer
The CDPSession instances are used to talk raw Chrome Devtools Protocol. ... Protocol methods can be called with CDPSession.send() method and protocol events ......
Read more >Using Chrome Devtools Protocol with Puppeteer
Puppeteer is a high level abstraction over the Chrome Devtools Protocol that gives you a user-friendly API to drive Chromium (or Blink) based...
Read more >keep open browser in pyppeteer and create CDPSession
connect() function but it seems to be closed imidiately even if I don't call pyppeteer.browser.Browser.close() . test01.py: import asyncio from ...
Read more >Puppeteer documentation - DevDocs
Indicates that the browser is connected. browser.newPage(). returns: <Promise<Page>>. Promise which resolves to a new Page object. The Page is ...
Read more >Getting to Know Puppeteer Using Practical Examples
Once it's resolved, we get a browser instance that represents our initialized instance. Connecting Chromium. Sometimes we want to interact with ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@cliffordfajardo I am not using Lighthouse User Flows. My plan is to use playwright/test to get to interesting points in time and then leverage the lighthouse package as described in https://www.checklyhq.com/learn/headless/basics-performance/#additional-performance-libraries
You can launch the browser yourself and connect playwright with connectOverCDP. We don’t want to be in the business of managing CDP connections for you, as they can get very complicated and browser specific.