4 ms·
Is there a difference between Chrome+puppeteer vs Chrome+selenium? Is there anything special that Chrome headless has that ordinary Chrome wouldn't have?
by ivan_ah 9y ago
Is there a difference between Chrome+puppeteer vs Chrome+selenium?
Is there anything special that Chrome headless has that ordinary Chrome wouldn't have?
- simonw 9y agoI know plenty of people who dislike working with Selenium. I haven't yet met anyone who's had enough experience with Puppeteer to hate it yet.
- nojvek 9y agoChrome headless is just that. Chrome that’s headless. Selenium is a cross browser api that connects to browser via some port. But usually it’s a high level api since it’s a common denominator of browser apis. Selenium uses middleware webdriver libs sometimes and usually quite bloated. Puppeteer uses Chrome Remote Debug Protocol, which is the same protocol Devtools uses. It’s just a simple JSON RPC over websockets. Puppeteer creates a nice library abstraction over this api. The advantage of puppeteer over selenium is that you have a lot more control over chrome. Network, perf, screenshots, coverage, dom & style traversal, etc. It’s a very reliable API too since Chrome Devtools team maintains the backend. Selenium on the other hand surprises me with all sorts of quirks.
- nurettin 9y agoBeen using selenium and webdriver with ruby for the past five years, there is pretty much nothing it cannot do. Performance is a big hit, though.
- make3 9y agoI really love Selenium actually.. makes me feel.. powrful, somehow, like an evil genius or something
- nurettin 9y agoMy evil genius moment with selenium happened when I ran a headless client to visit the login page of a bank, wait for 2fa sms code from my Android application, then use the code to log in and place some automated stock orders.