FFFF GitHub - irfanahmadein/cuprite at node_id · GitHub
[go: up one dir, main page]

Skip to content
irfanahmadeinPublic
forked from rubycdp/cuprite

About

Headless Chrome driver for Capybara

Resources

Stars

0 stars

Watchers

1 watching

Forks

 
 

Latest commit

 

History

102 Commits

Folders and files

Repository files navigation

Cuprite - Headless Chrome driver for Capybara

Cuprite is a pure Ruby driver (read as no Java/Selenium/WebDriver/ChromeDriver requirement) for Capybara. It allows you to run your Capybara tests on a headless Chrome or Chromium browser while the latter is prefered for now because we work with tip-of-tree protocol.

The emphasis was made on raw CDP protocol because Headless Chrome allows you to do so many cool things that are barely supported by WebDriver because it should have consistent design with other browsers. The design of the driver will be as close to Poltergeist as possible but it is not the goal.

Installation

Add this line to your Gemfile and run bundle install:

gem "cuprite"

In your test setup add:

require "capybara/cuprite"
Capybara.javascript_driver = :cuprite

If you were previously using the :rack_test driver, be aware that your app will now run in a separate thread and this can have consequences for transactional tests. See the Capybara README for more detail.

Installing Chromium

As Chromium is stopped being built as a package for Linux don't even try to install it this way because it will either be outdated or unofficial package. Both are bad. Download it from official source.

License

Copyright 2018 Machinio

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Headless Chrome driver for Capybara

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0