{"repo":"rubycdp/cuprite","free":true,"listed":false,"github":"https://github.com/rubycdp/cuprite","clone":"git clone https://github.com/rubycdp/cuprite.git","description":"Headless Chrome/Chromium driver for Capybara","language":"Ruby","stars":1397,"topics":["capybara","chromium","chrome","driver","headless","headless-chrome","testing","testing-tools","integration-testing"],"license":"MIT","category":"dev-tools","readme_excerpt":"Cuprite - Headless Chrome driver for Capybara Cuprite is a pure Ruby driver (read as no Selenium/WebDriver/ChromeDriver dependency) for Capybara. It allows you to run Capybara tests on a headless Chrome or Chromium. Under the hood it uses Ferrum which is high-level API to the browser by CDP protocol. Install Add this to your Gemfile and run bundle install . In your test setup add: if you use Docker don't forget to pass no-sandbox option: Since Cuprite uses Ferrum there are many useful methods you can call even using this driver: For Selenium you better check your code for manage calls because it works differently in Cuprite, see the documentation below. Customization See the full list of options for Ferrum. You can pass options with the following code in your test setup: Cuprite -specific options are: options Hash :url blacklist (Array) - array of regexes to match against requested URLs :url whitelist (Array) - array of regexes to match against requested URLs Debugging You can put page.driver.debug or page.driver.debug(binding) in your test to pause it. This will launch the browser where you can inspect the content. In the middle of the execution Chrome will open a new tab where you can inspect the content and also if you passed binding an irb or pry console will be opened where you can further experiment with the test. Clicking/Scrolling page.driver.click(x, y) Click a very specific area of the screen. page.driver.scroll to(left, top) Scroll to a given position. element.send","default_branch":null,"files":null,"tree":[],"storefront":"/r/rubycdp","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rubycdp/cuprite/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}