onlyoffice_webdriver_wrapper 1.25.0 → 1.26.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0406be22f647d768ab1a08c35913d5a70f092e9309fbcce7200318d8e389a8fb
4
- data.tar.gz: d26222a0ff2421bae631f8797bf68d0deab8e78ad971161c901acb6a0cee1f90
3
+ metadata.gz: 0aceaacb5bf7e66061ddafda2df0e9d06e12a77ec871bb3bedbc9b96967b8d0a
4
+ data.tar.gz: c98dd310419eed1cbd358f0f856b6dd1cdfad64b2d2984564e6b4171165846d8
5
5
  SHA512:
6
- metadata.gz: da00a809ec9fef9ee8da435da9f081cdca14e166852357f231cbf0b191cba734956ef241252a1b4d95474c20aa0584889cf911e5274685d0ba0e14fb62c4f219
7
- data.tar.gz: a8a234dc690e7d63bf83c03cf613257705b913f5d47da44004b53b4a9afb86c747bd1080ceec1b6c23bd5a68ebcdf3d4a0dc517115beeb660f6f59194d0b5532
6
+ metadata.gz: d83017ba4e1e435c85beceff3a4b9148782c63617f640e0b1474686fb143bb29a131824c0a7570461832081ea712963477d3025913941afa122904a1e87f809e
7
+ data.tar.gz: ce0b93eb08737ad701497762ec174947d052d39394d300352477f8f95b1dcc4b6e1a716136f41fd08d37e7aa22a5b79e498d5d42c2add58404c1bd4254481a20
@@ -4,6 +4,6 @@ module OnlyofficeWebdriverWrapper
4
4
  # Module for storing version data
5
5
  module Version
6
6
  # @return [String] Current stable version of gem
7
- STRING = '1.25.0'
7
+ STRING = '1.26.0'
8
8
  end
9
9
  end
@@ -12,28 +12,30 @@ module OnlyofficeWebdriverWrapper
12
12
 
13
13
  # Click on locator
14
14
  # @param xpath_name [String] xpath to click
15
- # @param by_javascript [True, False] should be clicked by javascript
15
+ # @param by_javascript [True, False] should be clicked by javascript or by webdriver action
16
16
  # @param count [Integer] count of clicks
17
17
  # @param after_timeout [Integer] timeout after click
18
18
  def click_on_locator(xpath_name, by_javascript = false, count: 1, after_timeout: 0)
19
19
  element = get_element(xpath_name)
20
20
  return webdriver_error("Element with xpath: #{xpath_name} not found") if element.nil?
21
21
 
22
- if by_javascript
23
- execute_javascript("#{dom_element_by_xpath(xpath_name)}.click();")
24
- else
25
- begin
26
- count.times do
27
- element.click
28
- sleep(after_timeout)
29
- end
30
- rescue Selenium::WebDriver::Error::ElementNotInteractableError => e
31
- webdriver_error(e.class,
32
- 'Selenium::WebDriver::Error::ElementNotInteractableError: ' \
33
- "element not visible for xpath: #{xpath_name}")
34
- rescue StandardError => e
35
- webdriver_error(e.class, "UnknownError #{e.message} #{xpath_name}")
22
+ click_function = if by_javascript
23
+ -> { execute_javascript("#{dom_element_by_xpath(xpath_name)}.click();") }
24
+ else
25
+ -> { element.click }
26
+ end
27
+
28
+ begin
29
+ count.times do
30
+ click_function.call
31
+ sleep(after_timeout)
36
32
  end
33
+ rescue Selenium::WebDriver::Error::ElementNotInteractableError => e
34
+ webdriver_error(e.class,
35
+ 'Selenium::WebDriver::Error::ElementNotInteractableError: ' \
36
+ "element not visible for xpath: #{xpath_name}")
37
+ rescue StandardError => e
38
+ webdriver_error(e.class, "UnknownError #{e.message} #{xpath_name}")
37
39
  end
38
40
  end
39
41
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onlyoffice_webdriver_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.25.0
4
+ version: 1.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ONLYOFFICE
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-04-10 00:00:00.000000000 Z
14
+ date: 2024-04-25 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: headless
@@ -135,9 +135,9 @@ files:
135
135
  - lib/onlyoffice_webdriver_wrapper/helpers/bin/geckodriver
136
136
  - lib/onlyoffice_webdriver_wrapper/helpers/chrome_helper.rb
137
137
  - lib/onlyoffice_webdriver_wrapper/helpers/chrome_helper/chrome_version_helper.rb
138
- - lib/onlyoffice_webdriver_wrapper/helpers/chrome_helper/chromedriver_bin/chromedriver_linux_121
139
138
  - lib/onlyoffice_webdriver_wrapper/helpers/chrome_helper/chromedriver_bin/chromedriver_linux_122
140
139
  - lib/onlyoffice_webdriver_wrapper/helpers/chrome_helper/chromedriver_bin/chromedriver_linux_123
140
+ - lib/onlyoffice_webdriver_wrapper/helpers/chrome_helper/chromedriver_bin/chromedriver_linux_124
141
141
  - lib/onlyoffice_webdriver_wrapper/helpers/chrome_helper/chromedriver_bin/chromedriver_mac
142
142
  - lib/onlyoffice_webdriver_wrapper/helpers/firefox_helper.rb
143
143
  - lib/onlyoffice_webdriver_wrapper/helpers/firefox_helper/save_to_disk_files.list
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
195
  - !ruby/object:Gem::Version
196
196
  version: '0'
197
197
  requirements: []
198
- rubygems_version: 3.5.7
198
+ rubygems_version: 3.5.9
199
199
  signing_key:
200
200
  specification_version: 4
201
201
  summary: ONLYOFFICE Webdriver Wrapper Gem