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 +4 -4
- data/lib/onlyoffice_webdriver_wrapper/helpers/chrome_helper/chromedriver_bin/{chromedriver_linux_121 → chromedriver_linux_124} +0 -0
- data/lib/onlyoffice_webdriver_wrapper/helpers/chrome_helper/chromedriver_bin/chromedriver_mac +0 -0
- data/lib/onlyoffice_webdriver_wrapper/version.rb +1 -1
- data/lib/onlyoffice_webdriver_wrapper/webdriver/click_methods.rb +17 -15
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0aceaacb5bf7e66061ddafda2df0e9d06e12a77ec871bb3bedbc9b96967b8d0a
|
4
|
+
data.tar.gz: c98dd310419eed1cbd358f0f856b6dd1cdfad64b2d2984564e6b4171165846d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d83017ba4e1e435c85beceff3a4b9148782c63617f640e0b1474686fb143bb29a131824c0a7570461832081ea712963477d3025913941afa122904a1e87f809e
|
7
|
+
data.tar.gz: ce0b93eb08737ad701497762ec174947d052d39394d300352477f8f95b1dcc4b6e1a716136f41fd08d37e7aa22a5b79e498d5d42c2add58404c1bd4254481a20
|
Binary file
|
data/lib/onlyoffice_webdriver_wrapper/helpers/chrome_helper/chromedriver_bin/chromedriver_mac
CHANGED
Binary file
|
@@ -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
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
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.
|
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-
|
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.
|
198
|
+
rubygems_version: 3.5.9
|
199
199
|
signing_key:
|
200
200
|
specification_version: 4
|
201
201
|
summary: ONLYOFFICE Webdriver Wrapper Gem
|