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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe12b63e804baec935bd02d7c762665dc42ae2ffaaa6b22e9f87b8897f7094fe
4
- data.tar.gz: aac62666386193b8afe23e973d61cfb79654cbc9697cbf6984919608cfa9cb04
3
+ metadata.gz: f8ace97cd83cc705357c4549443dc49d25cbfdf9f641946dbad4585029e7b37c
4
+ data.tar.gz: 6286fc3877f2291112e576c7d0066f04a7368d4b37932c0b84d4097ce7855612
5
5
  SHA512:
6
- metadata.gz: 43b653341d3b50c0c5f16b691eb293a284ade5b3287bcebe5bd88a6a131daae6d3a52117fe2eef75c3d66002421c7ed8df8ae3930fded89fdcf248fe8c7d7e11
7
- data.tar.gz: 5bd9fee614e98c0a825cd09f5eb5bb4aab8a17b935bc2dd4651e5436f3111608956ee8ba271bee6af64d62e09671631b08e4d9b14d2aa4cb5ff8a9f853bab2f2
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 = { options: 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, options: options, service: firefox_service, desired_capabilities: caps
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
@@ -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 = '0.22.1'
7
+ STRING = '1.0.0'
8
8
  end
9
9
  end
@@ -23,8 +23,8 @@ module OnlyofficeWebdriverWrapper
23
23
  else
24
24
  begin
25
25
  count.times { element.click }
26
- rescue Selenium::WebDriver::Error::ElementNotVisibleError => e
27
- webdriver_error(e.class, "Selenium::WebDriver::Error::ElementNotVisibleError: element not visible for xpath: #{xpath_name}")
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
@@ -7,7 +7,7 @@ module OnlyofficeWebdriverWrapper
7
7
  def browser_logs
8
8
  return [] if browser == :firefox # not implemented, see https://github.com/mozilla/geckodriver/issues/284
9
9
 
10
- @driver.manage.logs.get(:browser)
10
+ @driver.logs.get(:browser)
11
11
  end
12
12
  end
13
13
  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 TimeoutError => e
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::NoSuchDriverError, TimeoutError => e
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.22.1
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: 2021-12-17 00:00:00.000000000 Z
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: '3'
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: '3'
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: '6'
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: '6'
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.2.32
335
+ rubygems_version: 3.3.4
336
336
  signing_key:
337
337
  specification_version: 4
338
338
  summary: ONLYOFFICE Webdriver Wrapper Gem