“Capybara” is a library to helps you test web applications.
This article is a cheat sheet for Ruby “Capybara“
Write sample code to
You can execute
capybara_sample_spec.rb by RSpec:
Sample code using Capybara without RSpec or other framework is as follows:
A page object is an object-oriented class that serves as an interface to a page of your TEST.
The Page Object Design Pattern provides the following advantages:
- There is a clean separation between test code and page specific code such as locators.
- There is a single repository for the services or operations offered by the page.
Policy of the Page Object Design Patttern is as follows:
- Create a method to abstract controlling UI
- Return new Page Object if there is page transition
- Not include assertion logic in Page Object
- Should check successful of page transition
- capybara cheat sheet
- UI Testing with RSpec and Capybara [cheat sheet]
- Launch Academy: Codecabulary
- File: README — Documentation for jnicklas/capybara (master)