selenium-webdriver-element-extend_click_again 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d231f983258c6fb563704ca35a330251fb8b78387698e0116bfae741e2bdc27
4
- data.tar.gz: 90ea699f1f5a77afcbcd3c00f2e01954a5c6f43d64801b012ad522a5d46f0764
3
+ metadata.gz: 78df726513ab3d468dd875a9ad1bef8393cc302decc8a030e2dc746f1b6d426a
4
+ data.tar.gz: 83e853c2c9648ec775b8713b66cd7c2fa776e674c7727495603510f6126fdff5
5
5
  SHA512:
6
- metadata.gz: b9f2d48fbeaef864ff93f120a2c68fa2376180e7093d33f448da3d9cdf56a5d0afbde8833540bf08e49e07cc93c03d11d5803a475d608e577e9f47187bb45478
7
- data.tar.gz: 6d4d6fa17a10c9fa7c5073c6d91793865103034faaff3cc4ca7d06576482ba439a295d4df3af36306bf61c3aa7b312b364aeae9ed9d02c8c84cbfc60d7f4831c
6
+ metadata.gz: afe7dfafda60fac95664e26f8dfa2118899456a480e00213a96cce33d4dbdaf2711e4e547fddf1b295745915bb419ed8a37de69bf0a2eaf34a508dbc661b8ce3
7
+ data.tar.gz: 763bfb99b196c0dee6dce06a128f0c4cfb4bf91f43264047dde43c2467e193092227dca8a52ae0731384a6a7b71f5a8ea32bf14a289fca497cabaf55243c7234
data/README.md CHANGED
@@ -1,6 +1,13 @@
1
- # Selenium::Webdriver::Element::ExtendClickAgain
1
+ # Selenium::WebDriver::Element::ExtendClickAgain
2
2
 
3
- `Selenium::WebDriver::Element#click` sometimes fails because the element is not clickable and other element would receive the click. This gem extend `click` to scroll the element into the center to avoid that.
3
+ `Selenium::WebDriver::Element#click` sometimes fails because the element is not clickable and other element receives the click:
4
+
5
+ ```
6
+ Element <button name="button">...</button> is not clickable at point (40, 881).
7
+ Other element would receive the click: <footer>...</footer>
8
+ ```
9
+
10
+ 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.
4
11
 
5
12
  ## Installation
6
13
 
@@ -4,9 +4,9 @@ require 'selenium/webdriver/element/extend_click_again/version'
4
4
 
5
5
  module Selenium
6
6
  module WebDriver
7
- # monkey patch
8
7
  class Element
9
8
  # @override
9
+ # monkey patch
10
10
  def click
11
11
  bridge.click_element @id
12
12
  rescue Selenium::WebDriver::Error::WebDriverError
@@ -4,7 +4,7 @@ module Selenium
4
4
  module Webdriver
5
5
  module Element
6
6
  module ExtendClickAgain
7
- VERSION = '0.1.0'
7
+ VERSION = '0.1.1'
8
8
  end
9
9
  end
10
10
  end
@@ -10,13 +10,15 @@ Gem::Specification.new do |spec|
10
10
  spec.authors = ['oieioi']
11
11
  spec.email = ['atsuinatsu.samuifuyu@gmail.com']
12
12
 
13
- spec.summary = 'Try to click element when element click intercepted'
14
- spec.description = 'Selenium::WebDriver::Element#click sometimes fails because the element is not clickable and other element would receive the click. This gem extend `click` to scroll the element into the center to avoid that.'
13
+ spec.summary = 'Extends `Element#click` to avoid not clickable error.'
14
+ spec.description = <<~DESC
15
+ Selenium::WebDriver::Element#click sometimes fails because the element is not clickable and other element receives the click.
16
+ This gem extends `click` to avoid that.
17
+ When `click` fails with `not clickable` error, this tries to center the element with executing JavaScript `Element.scrollIntoView()` and click it again.
18
+ DESC
15
19
  spec.homepage = 'https://github.com/oieioi/selenium-webdriver-element-extend_click_again'
16
20
  spec.license = 'MIT'
17
21
 
18
- # Specify which files should be added to the gem when it is released.
19
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
20
22
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
21
23
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selenium-webdriver-element-extend_click_again
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - oieioi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-18 00:00:00.000000000 Z
11
+ date: 2019-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver
@@ -80,9 +80,10 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- description: Selenium::WebDriver::Element#click sometimes fails because the element
84
- is not clickable and other element would receive the click. This gem extend `click`
85
- to scroll the element into the center to avoid that.
83
+ description: |
84
+ Selenium::WebDriver::Element#click sometimes fails because the element is not clickable and other element receives the click.
85
+ This gem extends `click` to avoid that.
86
+ When `click` fails with `not clickable` error, this tries to center the element with executing JavaScript `Element.scrollIntoView()` and click it again.
86
87
  email:
87
88
  - atsuinatsu.samuifuyu@gmail.com
88
89
  executables: []
@@ -124,5 +125,5 @@ requirements: []
124
125
  rubygems_version: 3.0.3
125
126
  signing_key:
126
127
  specification_version: 4
127
- summary: Try to click element when element click intercepted
128
+ summary: Extends `Element#click` to avoid not clickable error.
128
129
  test_files: []