Closed twalpole closed 6 years ago
@twalpole that all sounds good to me I myself on my spare time try to implement cdp in plain ruby, cause if I'm not mistaken puppeteer requires nodejs right?
@route - Yes it does require nodejs. Using it was my first step because it allows for replacing PhantomJS relatively easily, second step would be to implement the required cdp stuff in plain ruby and remove the need for puppeteer (but that is a bigger project)
@twalpole overall I agree on a new project, let's create one. I'll try to help and meanwhile will continue working on cdp
Is there a link to the new project?
@tetron Not yet, I need to get windows & frames working properly first -- probably early next week
Would js_errors option still work with headless Chrome? A very useful feature of running Capybara tests in Phantom is that they fail if there are any uncaught errors. Does Chrome expose this?
Hi guys,
Maybe it's worth mentioning it, there's already a go implementation to use chrome headless without using puppeteer : https://github.com/raff/godet
I'm not suggesting to avoid depending on node just to depend on go :) But the whole implementation holds in a single file, godet.go, so I guess it could help reading it to write implementation for other languages without having to understand the whole puppeteer codebase and until there's a proper documentation for the protocol.
@twalpole I don't want to be bothersome but is there a puppeteer project yet?
@AntiFish03 After having flakiness with puppeteer I moved to just talking directly to chrome using the chrome debugger protocol. It currently passes most of the expected tests (except around multiple windows and frames) but life has got in the way and I haven't had time to clean it up for release.
@twalpole Thanks for the update!
@twalpole Do you have an preliminary performance results? I recently played with switching a large test suite from poltergeist to headless chrome via selenium and the tests went from around 4 to 8 minutes. I am not sure if that is due to selenium webdriver's protocol or chrome's performance however.
@Aesthetikx It'll probably be closer in speed to selenium than poltergeist. It's the price that's paid for having full support of current web technologies.
@twalpole not sure if this is still WiP but if you're working directly w/ the CDP, this is an issue I've been trying to get Selenium to resolve (showing sourcemap location rather than bundled source location in js console logs)
The Chromium team's suggested solution: https://bugs.chromium.org/p/chromium/issues/detail?id=812153#c9
@teampoltergeist I started this project recently https://github.com/machinio/cuprite it's still in its early stage but since my company supports and needs it for our own purpose I will work full time on that.
@teampoltergeist Due to the abandonment of PhantomJS I've been working on rewriting Poltergeist to use https://github.com/GoogleChrome/puppeteer instead. My original thought was that it would make a good Poltergeist 2.0. However, the more I work on it the more I think it may be better to just spin off a puppeteer driven version into its own new project/driver in order to separate issues and potential API changes that are necessary. If anyone have any problems/issues with me doing that please let me know.