https://github.com/oieioi/selenium-webdriver-element-extend_click_again
🤖 Extends `Element#click` to avoid not clickable error.
https://github.com/oieioi/selenium-webdriver-element-extend_click_again
rubygem selenium webdriver
Last synced: about 1 month ago
JSON representation
🤖 Extends `Element#click` to avoid not clickable error.
- Host: GitHub
- URL: https://github.com/oieioi/selenium-webdriver-element-extend_click_again
- Owner: oieioi
- License: mit
- Created: 2019-07-18T10:25:30.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-22T07:23:26.000Z (almost 7 years ago)
- Last Synced: 2025-12-16T23:29:26.051Z (6 months ago)
- Topics: rubygem, selenium, webdriver
- Language: Ruby
- Homepage: https://rubygems.org/gems/selenium-webdriver-element-extend_click_again
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this 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 ... is not clickable at point (40, 881).
Other element would receive 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()`](https://developer.mozilla.org/docs/Web/API/Element/scrollIntoView) and click it again.
## Installation
Add this line to your application's Gemfile:
```ruby
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
```ruby
require 'selenium/webdriver/element/extend_click_again'
```
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).