Conformity
Created mainly for use with the contact-congress project. Uses capybara with the addition of a Form class and a #field method that lets you fill out a form with different inputs each time.
Installation
Add this line to your application's Gemfile:
gem 'conformity'
And then execute:
$ bundle
Or install it yourself as:
$ gem install conformity
Usage
include Conformity
form = Form.new('http://www.google.com/') do
visit '/'
fill_in 'q', with: field(:query)
click_on 'Google Search'
end
form.field_names
# => [:query]
# returns Capybara::Session on success and raises FillError on failure
form.fill_with('ruby')
form.fill_with('rails')
form.fill_with('news')
Contributing
- Fork it ( http://github.com/
/conformity/fork ) - Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request