What is Capybara?

On Capybara’s official page it is described as follows: “Capybara is a library written in the Ruby programming language which makes it easy to simulate how a user interacts with your application. Capybara can talk with many different drivers who execute your tests through the same clean and simple interface. You can seamlessly choose between SeleniumWebkit, or pure Ruby driversCapybara automatically waits for your content to appear on the page, you never have to issue any manual periods of sleep.”

A Sample Capybara Feature:

When /^I login with "(.*?)" username and "(.*?)" password$/ do |user, password|

fill_in 'username', :with =>; user

fill_in 'password', :with =>; password

click_button 'Login'

end

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *