No commit activity in last 3 years
No release in over 3 years
Selenium::WebDriver::Element#click sometimes fails because the element is not clickable and other element receives the click. This gem extends `click` to avoid that. When `click` fails with `not clickable` error, this tries to center the element with executing JavaScript `Element.scrollIntoView()` and click it again.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.17
~> 10.0
~> 3.0

Runtime

 Project Readme

Selenium::WebDriver::Element::ExtendClickAgain

Selenium::WebDriver::Element#click sometimes fails because the element is not clickable and other element receives the click:

Element <button name="button">...</button> is not clickable at point (40, 881).
Other element would receive the click: <footer>...</footer>

This gem extends click to avoid that. When click fails with not clickable error, this tries to center the element with executing JavaScript Element.scrollIntoView() and click it again.

Installation

Add this line to your application's Gemfile:

gem 'selenium-webdriver-element-extend_click_again'

And then execute:

$ bundle

Or install it yourself as:

$ gem install selenium-webdriver-element-extend_click_again

Usage

require 'selenium/webdriver/element/extend_click_again'

License

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