Applitools
Applitools Ruby SDK.
Installation
Add this line to your application's Gemfile:
gem 'eyes_selenium_ruby'
And then execute:
$ bundle
Or install it yourself as:
$ gem install eyes_selenium_ruby
Standalone Usage
Applitools::Eyes.config[:apikey] = 'XXX'
eyes = Applitools::Eyes.new
eyes.test(app_name: 'my app', test_name: 'my test') do |eyes, driver|
driver.get 'http://www.mywebsite.com'
eyes.check_window('home page')
driver.find_element(:css, "li#pricing").click
eyes.check_window('pricing')
end
Integrated within your Capybara tests:
initializer:
Applitools::Eyes.config[:apikey] = 'XXX'
spec:
require 'eyes_selenium_ruby/capybara'
describe 'some test'
let(:eyes) do
Applitools::Eyes.new
end
it 'should navigate from home page to pricing page'
eyes.test(app_name: 'my app', test_name: 'my test') do |eyes|
visit root_path
page.should have_content('login')
eyes.check_window('home page')
click_link 'Pricing'
eyes.check_window('pricing')
page.should have_content('gold')
end
end
end
Contributing
- Fork it
- 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