No commit activity in last 3 years
No release in over 3 years
Sometimes I want to click at some point on a map in the tests. This gem adds click_at(point) helper which serves the need
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.2
~> 1.16
~> 3.5
~> 0.11
~> 3.12
~> 10.0
~> 3.0
 Project Readme

CapybaraClickAt - click_at(point) capybara helper

Why do you need it?

  1. If you want to click at certain point on a map
  2. If you want to click at certain point on a canvas, colour select etc.

Tested versions and drivers

  • Capybara: v2.18, v3.0, v3.5
  • Drivers: Selenium, Webkit, Poltergeist

Installation

Add this line to your application's Gemfile:

group :test do
  gem 'capybara-click_at'
end

And then execute:

$ bundle

Or install it yourself as:

$ gem install capybara-click_at

Rspec

In your spec_helper.rb

RSpec.configure do |config|
  config.include CapybaraClickAt
end

Cucumber

In your env.rb

World CapybaraClickAt

Usage

Click at certain point on the page

click_at(5, 5)

Click at certain point inside a container specified by CSS or XPath selector

click_at(5, 5, css: '#map')
click_at(5, 5, xpath: '//div[@id="select-colour"]')

Contributing

  1. Add a test case which covers the bug
  2. Add code which makes the test green
  3. Open pull request

License

The gem is available as open source under the terms of the MIT License.