15 Matching Annotations
  1. Nov 2022
    1. So when configuring Capybara, I'm using ignore_default_browser_options, and only re-use this DEFAULT_OPTIONS and exclude the key I don't want Capybara::Cuprite::Driver.new( app, { ignore_default_browser_options: true, window_size: [1200, 800], browser_options: { 'no-sandbox': nil }.merge(Ferrum::Browser::Options::Chrome::DEFAULT_OPTIONS.except( "disable-features", "disable-translate", "headless" )), headless: false, } )
  2. Oct 2022
    1. Capybara.register_driver(:cuprite) do |app| Capybara::Cuprite::Driver.new( app, { window_size: [1200, 800], inspector: true, url_blacklist: ['https://www.google-analytics.com/analytics.js', 'https://www.google-analytics.com/', 'https://js-agent.newrelic.com', 'https://www.googletagmanager.com', 'https://cdnjs.cloudflare.com', 'http://fonts.googleapis.com', 'https://use.fontawesome.com', 'https://bam.nr-data.net', 'http://connect.facebook.net', 'http://static.ak.facebook.com', 'https://s-static.ak.facebook.com', 'https://www.facebook.com', 'http://ajax.googleapis.com'], debug: true, browser_options: { 'no-sandbox' => nil, 'headless' => nil, 'blink-settings' => 'imagesEnabled=false' }, timeout: 20, logger: $stdout, process_timeout: 20 } ) end
    1. Just as a breadcrumb here for future readers (I found this thread when I was searching), it seems Cuprite has support for non-headless now (via Ferrum). headless: false in the options does the trick. And thanks for your work on Cuprite.
    2. @route @twalpole as a community I think we're super grateful for your work on a CDP alternative to chromedriver/selenium, poltergeist etc. I do think collaboration could be very valuable though, although it would likely mean abandoning one of the projects and teaming up on the other, you both obviously have very deep knowledge of CDP and therefore would get a load more done than any of us "end users" trying to wade in there. The status for us on our Rails project is that Apparition fails with a ton of errors, they all seem related to handling timing events (accept_prompt doesn't work, opening new windows seems problematic etc etc etc) whereas Cuprite only rails with a cookie gem we're using (easy fixed) and doesn't support drag_to yet. So to me Cuprite seems more complete, but I don't know much about the internals.
    3. As both projects are written by 2 different people independently there's huge difference in the code. I don't think I have time or wish to merge them because it's huge amount of work. The common thing between them is only CDP that's all. Though Cuprite is already stable and supports all features that Capybara requires, we run tests and do many cools things with it in production.
    4. As a history mark, when back then I asked Thomas if he started to work on CDP, he said yes but never finished it, so I started this project from scratch which by now feels completed. After releasing it I only yesterday realized that he open-sourced his project and keeps working on it. I think it just feels hard to throw everything you have written to trash, but I wasn't proposed at the beginning to work together on common project and this is the reason Cuprite had began. Though since this project is completed I see no sense to work on something else especially for me, the only difference would be in Ruby implementation which is boring as you can do things in a different manner and CDP has issues too so the difference could be only how we workaround them.
  3. Jun 2021
    1. A lot of projects leveraging CDP appeared since then, including the most well-known one—Puppeteer, a browser automation library for Node.js. What about the Ruby world? Ferrum, a CDP library for Ruby, although being a pretty young one, provides a comparable to Puppeteer experience. And, what’s more important for us, it ships with a companion project called Cuprite—a pure Ruby Capybara driver using CDP.