onlyoffice_webdriver_wrapper 0.22.1 → 1.0.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.rb +1 -3
- data/lib/onlyoffice_webdriver_wrapper/helpers/firefox_helper.rb +1 -1
- data/lib/onlyoffice_webdriver_wrapper/version.rb +1 -1
- data/lib/onlyoffice_webdriver_wrapper/webdriver/click_methods.rb +2 -2
- data/lib/onlyoffice_webdriver_wrapper/webdriver/webdriver_browser_log_helper.rb +1 -1
- data/lib/onlyoffice_webdriver_wrapper/webdriver/webdriver_js_methods.rb +1 -1
- data/lib/onlyoffice_webdriver_wrapper/webdriver/webdriver_navigation_methods.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8ace97cd83cc705357c4549443dc49d25cbfdf9f641946dbad4585029e7b37c
|
4
|
+
data.tar.gz: 6286fc3877f2291112e576c7d0066f04a7368d4b37932c0b84d4097ce7855612
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e8b3e3b8b917d9b767ecb17f7f0171da4081be4a72486dd4369d534f2286d2a195d8a95c5bd18b92ad0edef3e0f626b3713501e76c6b355cb4dd3ea8163d55d
|
7
|
+
data.tar.gz: 1e334532172a8b3d9f4c5739540895845788752dfe06edbe0d6b678c2105681bd8877daedeed84e5b58c1e3e128068408f742f8a71756c0e877b8c1361fe7244
|
@@ -35,13 +35,11 @@ module OnlyofficeWebdriverWrapper
|
|
35
35
|
credentials_enable_service: false
|
36
36
|
}
|
37
37
|
caps = Selenium::WebDriver::Remote::Capabilities.chrome
|
38
|
-
caps[:logging_prefs] = { browser: 'ALL' }
|
39
38
|
caps[:proxy] = Selenium::WebDriver::Proxy.new(ssl: "#{@proxy.proxy_address}:#{@proxy.proxy_port}") if @proxy
|
40
39
|
switches = add_useragent_to_switches(DEFAULT_CHROME_SWITCHES)
|
41
40
|
options = Selenium::WebDriver::Chrome::Options.new(args: switches,
|
42
41
|
prefs: prefs)
|
43
|
-
webdriver_options = {
|
44
|
-
desired_capabilities: caps,
|
42
|
+
webdriver_options = { capabilities: [caps, options],
|
45
43
|
service: chrome_service }
|
46
44
|
driver = Selenium::WebDriver.for :chrome, webdriver_options
|
47
45
|
maximize_chrome(driver)
|
@@ -20,7 +20,7 @@ module OnlyofficeWebdriverWrapper
|
|
20
20
|
options = Selenium::WebDriver::Firefox::Options.new(profile: profile)
|
21
21
|
caps = Selenium::WebDriver::Remote::Capabilities.firefox
|
22
22
|
caps[:proxy] = Selenium::WebDriver::Proxy.new(ssl: "#{@proxy.proxy_address}:#{@proxy.proxy_port}") if @proxy
|
23
|
-
driver = Selenium::WebDriver.for :firefox,
|
23
|
+
driver = Selenium::WebDriver.for :firefox, service: firefox_service, capabilities: [caps, options]
|
24
24
|
driver.manage.window.size = Selenium::WebDriver::Dimension.new(headless.resolution_x, headless.resolution_y) if headless.running?
|
25
25
|
driver
|
26
26
|
end
|
@@ -23,8 +23,8 @@ module OnlyofficeWebdriverWrapper
|
|
23
23
|
else
|
24
24
|
begin
|
25
25
|
count.times { element.click }
|
26
|
-
rescue Selenium::WebDriver::Error::
|
27
|
-
webdriver_error(e.class, "Selenium::WebDriver::Error::
|
26
|
+
rescue Selenium::WebDriver::Error::ElementNotInteractableError => e
|
27
|
+
webdriver_error(e.class, "Selenium::WebDriver::Error::ElementNotInteractableError: element not visible for xpath: #{xpath_name}")
|
28
28
|
rescue Exception => e
|
29
29
|
webdriver_error(e.class, "UnknownError #{e.message} #{xpath_name}")
|
30
30
|
end
|
@@ -12,7 +12,7 @@ module OnlyofficeWebdriverWrapper
|
|
12
12
|
OnlyofficeLoggerHelper.log("Executed js: `#{script}` with result: `#{result}`")
|
13
13
|
sleep(wait_timeout)
|
14
14
|
result
|
15
|
-
rescue
|
15
|
+
rescue Timeout::Error => e
|
16
16
|
# Usually this mean browser hang up or some modular
|
17
17
|
# window is blocking browser for execution of any code
|
18
18
|
# in that case performing `webdriver_error` only cause forever loop
|
@@ -22,7 +22,7 @@ module OnlyofficeWebdriverWrapper
|
|
22
22
|
# it is a root frame
|
23
23
|
def get_url
|
24
24
|
execute_javascript('return window.location.href')
|
25
|
-
rescue Selenium::WebDriver::Error::
|
25
|
+
rescue Selenium::WebDriver::Error::NoSuchFrameError, Timeout::Error => e
|
26
26
|
raise(e.class, "Browser is crushed or hangup with #{e}")
|
27
27
|
end
|
28
28
|
|
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: 0.
|
4
|
+
version: 1.0.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:
|
14
|
+
date: 2022-01-21 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: headless
|
@@ -95,28 +95,28 @@ dependencies:
|
|
95
95
|
requirements:
|
96
96
|
- - "~>"
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: '
|
98
|
+
version: '4'
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
101
|
version_requirements: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
103
|
- - "~>"
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: '
|
105
|
+
version: '4'
|
106
106
|
- !ruby/object:Gem::Dependency
|
107
107
|
name: watir
|
108
108
|
requirement: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - "~>"
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: '
|
112
|
+
version: '7'
|
113
113
|
type: :runtime
|
114
114
|
prerelease: false
|
115
115
|
version_requirements: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
117
|
- - "~>"
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: '
|
119
|
+
version: '7'
|
120
120
|
- !ruby/object:Gem::Dependency
|
121
121
|
name: overcommit
|
122
122
|
requirement: !ruby/object:Gem::Requirement
|
@@ -332,7 +332,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
332
332
|
- !ruby/object:Gem::Version
|
333
333
|
version: '0'
|
334
334
|
requirements: []
|
335
|
-
rubygems_version: 3.
|
335
|
+
rubygems_version: 3.3.4
|
336
336
|
signing_key:
|
337
337
|
specification_version: 4
|
338
338
|
summary: ONLYOFFICE Webdriver Wrapper Gem
|