selenium-webdriver 4.0.0.alpha2 → 4.0.0.alpha7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (259) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGES +172 -4
  3. data/LICENSE +1 -1
  4. data/lib/selenium/server.rb +25 -9
  5. data/lib/selenium/webdriver.rb +12 -8
  6. data/lib/selenium/webdriver/atoms/findElements.js +121 -0
  7. data/lib/selenium/webdriver/atoms/getAttribute.js +104 -7
  8. data/lib/selenium/webdriver/atoms/isDisplayed.js +76 -78
  9. data/lib/selenium/webdriver/atoms/mutationListener.js +38 -0
  10. data/lib/selenium/webdriver/chrome.rb +10 -9
  11. data/lib/selenium/webdriver/chrome/bridge.rb +20 -4
  12. data/lib/selenium/webdriver/chrome/driver.rb +7 -49
  13. data/lib/selenium/webdriver/chrome/options.rb +97 -57
  14. data/lib/selenium/webdriver/chrome/profile.rb +3 -3
  15. data/lib/selenium/webdriver/chrome/service.rb +0 -4
  16. data/lib/selenium/webdriver/common.rb +6 -1
  17. data/lib/selenium/webdriver/common/driver.rb +81 -17
  18. data/lib/selenium/webdriver/common/driver_extensions/has_authentication.rb +89 -0
  19. data/lib/selenium/webdriver/common/driver_extensions/has_devtools.rb +39 -0
  20. data/lib/selenium/webdriver/common/driver_extensions/has_log_events.rb +143 -0
  21. data/lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb +2 -1
  22. data/lib/selenium/webdriver/common/element.rb +5 -0
  23. data/lib/selenium/webdriver/common/logger.rb +48 -16
  24. data/lib/selenium/webdriver/common/manager.rb +5 -0
  25. data/lib/selenium/webdriver/common/options.rb +116 -0
  26. data/lib/selenium/webdriver/common/platform.rb +4 -1
  27. data/lib/selenium/webdriver/common/port_prober.rb +4 -6
  28. data/lib/selenium/webdriver/common/profile_helper.rb +10 -2
  29. data/lib/selenium/webdriver/common/proxy.rb +0 -0
  30. data/lib/selenium/webdriver/common/search_context.rb +3 -2
  31. data/lib/selenium/webdriver/common/service.rb +30 -113
  32. data/lib/selenium/webdriver/common/service_manager.rb +151 -0
  33. data/lib/selenium/webdriver/common/socket_lock.rb +2 -2
  34. data/lib/selenium/webdriver/common/takes_screenshot.rb +63 -0
  35. data/lib/selenium/webdriver/common/wait.rb +1 -1
  36. data/lib/selenium/webdriver/devtools.rb +132 -0
  37. data/lib/selenium/webdriver/devtools/console_event.rb +38 -0
  38. data/lib/selenium/webdriver/devtools/exception_event.rb +36 -0
  39. data/lib/selenium/webdriver/devtools/mutation_event.rb +37 -0
  40. data/lib/selenium/webdriver/devtools/v84/accessibility.rb +64 -0
  41. data/lib/selenium/webdriver/devtools/v84/animation.rb +100 -0
  42. data/lib/selenium/webdriver/devtools/v84/application_cache.rb +66 -0
  43. data/lib/selenium/webdriver/devtools/v84/audits.rb +63 -0
  44. data/lib/selenium/webdriver/devtools/v84/background_service.rb +69 -0
  45. data/lib/selenium/webdriver/devtools/v84/browser.rb +125 -0
  46. data/lib/selenium/webdriver/devtools/v84/cache_storage.rb +75 -0
  47. data/lib/selenium/webdriver/devtools/v84/cast.rb +72 -0
  48. data/lib/selenium/webdriver/devtools/v84/console.rb +59 -0
  49. data/lib/selenium/webdriver/devtools/v84/css.rb +167 -0
  50. data/lib/selenium/webdriver/devtools/v84/database.rb +66 -0
  51. data/lib/selenium/webdriver/devtools/v84/debugger.rb +231 -0
  52. data/lib/selenium/webdriver/devtools/v84/device_orientation.rb +55 -0
  53. data/lib/selenium/webdriver/devtools/v84/dom.rb +322 -0
  54. data/lib/selenium/webdriver/devtools/v84/dom_debugger.rb +95 -0
  55. data/lib/selenium/webdriver/devtools/v84/dom_snapshot.rb +67 -0
  56. data/lib/selenium/webdriver/devtools/v84/dom_storage.rb +81 -0
  57. data/lib/selenium/webdriver/devtools/v84/emulation.rb +182 -0
  58. data/lib/selenium/webdriver/devtools/v84/fetch.rb +99 -0
  59. data/lib/selenium/webdriver/devtools/v84/headless_experimental.rb +63 -0
  60. data/lib/selenium/webdriver/devtools/v84/heap_profiler.rb +109 -0
  61. data/lib/selenium/webdriver/devtools/v84/indexed_db.rb +102 -0
  62. data/lib/selenium/webdriver/devtools/v84/input.rb +142 -0
  63. data/lib/selenium/webdriver/devtools/v84/inspector.rb +57 -0
  64. data/lib/selenium/webdriver/devtools/v84/io.rb +61 -0
  65. data/lib/selenium/webdriver/devtools/v84/layer_tree.rb +97 -0
  66. data/lib/selenium/webdriver/devtools/v84/log.rb +68 -0
  67. data/lib/selenium/webdriver/devtools/v84/media.rb +59 -0
  68. data/lib/selenium/webdriver/devtools/v84/memory.rb +88 -0
  69. data/lib/selenium/webdriver/devtools/v84/network.rb +230 -0
  70. data/lib/selenium/webdriver/devtools/v84/overlay.rb +159 -0
  71. data/lib/selenium/webdriver/devtools/v84/page.rb +376 -0
  72. data/lib/selenium/webdriver/devtools/v84/performance.rb +65 -0
  73. data/lib/selenium/webdriver/devtools/v84/profiler.rb +113 -0
  74. data/lib/selenium/webdriver/devtools/v84/runtime.rb +195 -0
  75. data/lib/selenium/webdriver/devtools/v84/schema.rb +48 -0
  76. data/lib/selenium/webdriver/devtools/v84/security.rb +73 -0
  77. data/lib/selenium/webdriver/devtools/v84/service_worker.rb +118 -0
  78. data/lib/selenium/webdriver/devtools/v84/storage.rb +97 -0
  79. data/lib/selenium/webdriver/devtools/v84/system_info.rb +52 -0
  80. data/lib/selenium/webdriver/devtools/v84/target.rb +143 -0
  81. data/lib/selenium/webdriver/devtools/v84/tethering.rb +57 -0
  82. data/lib/selenium/webdriver/devtools/v84/tracing.rb +78 -0
  83. data/lib/selenium/webdriver/devtools/v84/web_audio.rb +72 -0
  84. data/lib/selenium/webdriver/devtools/v84/web_authn.rb +96 -0
  85. data/lib/selenium/webdriver/devtools/v85/accessibility.rb +64 -0
  86. data/lib/selenium/webdriver/devtools/v85/animation.rb +100 -0
  87. data/lib/selenium/webdriver/devtools/v85/application_cache.rb +66 -0
  88. data/lib/selenium/webdriver/devtools/v85/audits.rb +63 -0
  89. data/lib/selenium/webdriver/devtools/v85/background_service.rb +69 -0
  90. data/lib/selenium/webdriver/devtools/v85/browser.rb +125 -0
  91. data/lib/selenium/webdriver/devtools/v85/cache_storage.rb +75 -0
  92. data/lib/selenium/webdriver/devtools/v85/cast.rb +72 -0
  93. data/lib/selenium/webdriver/devtools/v85/console.rb +59 -0
  94. data/lib/selenium/webdriver/devtools/v85/css.rb +167 -0
  95. data/lib/selenium/webdriver/devtools/v85/database.rb +66 -0
  96. data/lib/selenium/webdriver/devtools/v85/debugger.rb +231 -0
  97. data/lib/selenium/webdriver/devtools/v85/device_orientation.rb +55 -0
  98. data/lib/selenium/webdriver/devtools/v85/dom.rb +322 -0
  99. data/lib/selenium/webdriver/devtools/v85/dom_debugger.rb +95 -0
  100. data/lib/selenium/webdriver/devtools/v85/dom_snapshot.rb +67 -0
  101. data/lib/selenium/webdriver/devtools/v85/dom_storage.rb +81 -0
  102. data/lib/selenium/webdriver/devtools/v85/emulation.rb +182 -0
  103. data/lib/selenium/webdriver/devtools/v85/fetch.rb +99 -0
  104. data/lib/selenium/webdriver/devtools/v85/headless_experimental.rb +63 -0
  105. data/lib/selenium/webdriver/devtools/v85/heap_profiler.rb +109 -0
  106. data/lib/selenium/webdriver/devtools/v85/indexed_db.rb +102 -0
  107. data/lib/selenium/webdriver/devtools/v85/input.rb +143 -0
  108. data/lib/selenium/webdriver/devtools/v85/inspector.rb +57 -0
  109. data/lib/selenium/webdriver/devtools/v85/io.rb +61 -0
  110. data/lib/selenium/webdriver/devtools/v85/layer_tree.rb +97 -0
  111. data/lib/selenium/webdriver/devtools/v85/log.rb +68 -0
  112. data/lib/selenium/webdriver/devtools/v85/media.rb +59 -0
  113. data/lib/selenium/webdriver/devtools/v85/memory.rb +88 -0
  114. data/lib/selenium/webdriver/devtools/v85/network.rb +230 -0
  115. data/lib/selenium/webdriver/devtools/v85/overlay.rb +160 -0
  116. data/lib/selenium/webdriver/devtools/v85/page.rb +376 -0
  117. data/lib/selenium/webdriver/devtools/v85/performance.rb +65 -0
  118. data/lib/selenium/webdriver/devtools/v85/profiler.rb +113 -0
  119. data/lib/selenium/webdriver/devtools/v85/runtime.rb +196 -0
  120. data/lib/selenium/webdriver/devtools/v85/schema.rb +48 -0
  121. data/lib/selenium/webdriver/devtools/v85/security.rb +73 -0
  122. data/lib/selenium/webdriver/devtools/v85/service_worker.rb +118 -0
  123. data/lib/selenium/webdriver/devtools/v85/storage.rb +97 -0
  124. data/lib/selenium/webdriver/devtools/v85/system_info.rb +52 -0
  125. data/lib/selenium/webdriver/devtools/v85/target.rb +145 -0
  126. data/lib/selenium/webdriver/devtools/v85/tethering.rb +57 -0
  127. data/lib/selenium/webdriver/devtools/v85/tracing.rb +78 -0
  128. data/lib/selenium/webdriver/devtools/v85/web_audio.rb +72 -0
  129. data/lib/selenium/webdriver/devtools/v85/web_authn.rb +96 -0
  130. data/lib/selenium/webdriver/devtools/v86/accessibility.rb +64 -0
  131. data/lib/selenium/webdriver/devtools/v86/animation.rb +100 -0
  132. data/lib/selenium/webdriver/devtools/v86/application_cache.rb +66 -0
  133. data/lib/selenium/webdriver/devtools/v86/audits.rb +63 -0
  134. data/lib/selenium/webdriver/devtools/v86/background_service.rb +69 -0
  135. data/lib/selenium/webdriver/devtools/v86/browser.rb +125 -0
  136. data/lib/selenium/webdriver/devtools/v86/cache_storage.rb +75 -0
  137. data/lib/selenium/webdriver/devtools/v86/cast.rb +72 -0
  138. data/lib/selenium/webdriver/devtools/v86/console.rb +59 -0
  139. data/lib/selenium/webdriver/devtools/v86/css.rb +181 -0
  140. data/lib/selenium/webdriver/devtools/v86/database.rb +66 -0
  141. data/lib/selenium/webdriver/devtools/v86/debugger.rb +233 -0
  142. data/lib/selenium/webdriver/devtools/v86/device_orientation.rb +55 -0
  143. data/lib/selenium/webdriver/devtools/v86/dom.rb +329 -0
  144. data/lib/selenium/webdriver/devtools/v86/dom_debugger.rb +95 -0
  145. data/lib/selenium/webdriver/devtools/v86/dom_snapshot.rb +67 -0
  146. data/lib/selenium/webdriver/devtools/v86/dom_storage.rb +81 -0
  147. data/lib/selenium/webdriver/devtools/v86/emulation.rb +193 -0
  148. data/lib/selenium/webdriver/devtools/v86/fetch.rb +99 -0
  149. data/lib/selenium/webdriver/devtools/v86/headless_experimental.rb +63 -0
  150. data/lib/selenium/webdriver/devtools/v86/heap_profiler.rb +109 -0
  151. data/lib/selenium/webdriver/devtools/v86/indexed_db.rb +102 -0
  152. data/lib/selenium/webdriver/devtools/v86/input.rb +143 -0
  153. data/lib/selenium/webdriver/devtools/v86/inspector.rb +57 -0
  154. data/lib/selenium/webdriver/devtools/v86/io.rb +61 -0
  155. data/lib/selenium/webdriver/devtools/v86/layer_tree.rb +97 -0
  156. data/lib/selenium/webdriver/devtools/v86/log.rb +68 -0
  157. data/lib/selenium/webdriver/devtools/v86/media.rb +59 -0
  158. data/lib/selenium/webdriver/devtools/v86/memory.rb +88 -0
  159. data/lib/selenium/webdriver/devtools/v86/network.rb +235 -0
  160. data/lib/selenium/webdriver/devtools/v86/overlay.rb +183 -0
  161. data/lib/selenium/webdriver/devtools/v86/page.rb +376 -0
  162. data/lib/selenium/webdriver/devtools/v86/performance.rb +65 -0
  163. data/lib/selenium/webdriver/devtools/v86/profiler.rb +113 -0
  164. data/lib/selenium/webdriver/devtools/v86/runtime.rb +196 -0
  165. data/lib/selenium/webdriver/devtools/v86/schema.rb +48 -0
  166. data/lib/selenium/webdriver/devtools/v86/security.rb +73 -0
  167. data/lib/selenium/webdriver/devtools/v86/service_worker.rb +118 -0
  168. data/lib/selenium/webdriver/devtools/v86/storage.rb +97 -0
  169. data/lib/selenium/webdriver/devtools/v86/system_info.rb +52 -0
  170. data/lib/selenium/webdriver/devtools/v86/target.rb +145 -0
  171. data/lib/selenium/webdriver/devtools/v86/tethering.rb +57 -0
  172. data/lib/selenium/webdriver/devtools/v86/tracing.rb +78 -0
  173. data/lib/selenium/webdriver/devtools/v86/web_audio.rb +72 -0
  174. data/lib/selenium/webdriver/devtools/v86/web_authn.rb +102 -0
  175. data/lib/selenium/webdriver/devtools/v87/accessibility.rb +73 -0
  176. data/lib/selenium/webdriver/devtools/v87/animation.rb +100 -0
  177. data/lib/selenium/webdriver/devtools/v87/application_cache.rb +66 -0
  178. data/lib/selenium/webdriver/devtools/v87/audits.rb +63 -0
  179. data/lib/selenium/webdriver/devtools/v87/background_service.rb +69 -0
  180. data/lib/selenium/webdriver/devtools/v87/browser.rb +125 -0
  181. data/lib/selenium/webdriver/devtools/v87/cache_storage.rb +75 -0
  182. data/lib/selenium/webdriver/devtools/v87/cast.rb +72 -0
  183. data/lib/selenium/webdriver/devtools/v87/console.rb +59 -0
  184. data/lib/selenium/webdriver/devtools/v87/css.rb +181 -0
  185. data/lib/selenium/webdriver/devtools/v87/database.rb +66 -0
  186. data/lib/selenium/webdriver/devtools/v87/debugger.rb +233 -0
  187. data/lib/selenium/webdriver/devtools/v87/device_orientation.rb +55 -0
  188. data/lib/selenium/webdriver/devtools/v87/dom.rb +329 -0
  189. data/lib/selenium/webdriver/devtools/v87/dom_debugger.rb +95 -0
  190. data/lib/selenium/webdriver/devtools/v87/dom_snapshot.rb +67 -0
  191. data/lib/selenium/webdriver/devtools/v87/dom_storage.rb +81 -0
  192. data/lib/selenium/webdriver/devtools/v87/emulation.rb +193 -0
  193. data/lib/selenium/webdriver/devtools/v87/fetch.rb +99 -0
  194. data/lib/selenium/webdriver/devtools/v87/headless_experimental.rb +63 -0
  195. data/lib/selenium/webdriver/devtools/v87/heap_profiler.rb +109 -0
  196. data/lib/selenium/webdriver/devtools/v87/indexed_db.rb +102 -0
  197. data/lib/selenium/webdriver/devtools/v87/input.rb +143 -0
  198. data/lib/selenium/webdriver/devtools/v87/inspector.rb +57 -0
  199. data/lib/selenium/webdriver/devtools/v87/io.rb +61 -0
  200. data/lib/selenium/webdriver/devtools/v87/layer_tree.rb +97 -0
  201. data/lib/selenium/webdriver/devtools/v87/log.rb +68 -0
  202. data/lib/selenium/webdriver/devtools/v87/media.rb +59 -0
  203. data/lib/selenium/webdriver/devtools/v87/memory.rb +88 -0
  204. data/lib/selenium/webdriver/devtools/v87/network.rb +247 -0
  205. data/lib/selenium/webdriver/devtools/v87/overlay.rb +183 -0
  206. data/lib/selenium/webdriver/devtools/v87/page.rb +376 -0
  207. data/lib/selenium/webdriver/devtools/v87/performance.rb +65 -0
  208. data/lib/selenium/webdriver/devtools/v87/profiler.rb +125 -0
  209. data/lib/selenium/webdriver/devtools/v87/runtime.rb +196 -0
  210. data/lib/selenium/webdriver/devtools/v87/schema.rb +48 -0
  211. data/lib/selenium/webdriver/devtools/v87/security.rb +73 -0
  212. data/lib/selenium/webdriver/devtools/v87/service_worker.rb +118 -0
  213. data/lib/selenium/webdriver/devtools/v87/storage.rb +97 -0
  214. data/lib/selenium/webdriver/devtools/v87/system_info.rb +52 -0
  215. data/lib/selenium/webdriver/devtools/v87/target.rb +145 -0
  216. data/lib/selenium/webdriver/devtools/v87/tethering.rb +57 -0
  217. data/lib/selenium/webdriver/devtools/v87/tracing.rb +78 -0
  218. data/lib/selenium/webdriver/devtools/v87/web_audio.rb +72 -0
  219. data/lib/selenium/webdriver/devtools/v87/web_authn.rb +102 -0
  220. data/lib/selenium/webdriver/edge.rb +29 -9
  221. data/lib/selenium/webdriver/edge_chrome/bridge.rb +37 -0
  222. data/lib/selenium/webdriver/edge_chrome/driver.rb +48 -0
  223. data/lib/selenium/webdriver/edge_chrome/options.rb +37 -0
  224. data/lib/selenium/webdriver/edge_chrome/profile.rb +33 -0
  225. data/lib/selenium/webdriver/edge_chrome/service.rb +36 -0
  226. data/lib/selenium/webdriver/{edge → edge_html}/driver.rb +3 -35
  227. data/lib/selenium/webdriver/{edge → edge_html}/options.rb +26 -22
  228. data/lib/selenium/webdriver/{edge → edge_html}/service.rb +2 -6
  229. data/lib/selenium/webdriver/firefox.rb +18 -15
  230. data/lib/selenium/webdriver/firefox/bridge.rb +1 -1
  231. data/lib/selenium/webdriver/firefox/driver.rb +2 -31
  232. data/lib/selenium/webdriver/firefox/extension.rb +8 -0
  233. data/lib/selenium/webdriver/firefox/options.rb +47 -52
  234. data/lib/selenium/webdriver/firefox/profile.rb +7 -78
  235. data/lib/selenium/webdriver/firefox/service.rb +0 -4
  236. data/lib/selenium/webdriver/ie.rb +8 -7
  237. data/lib/selenium/webdriver/ie/driver.rb +0 -33
  238. data/lib/selenium/webdriver/ie/options.rb +10 -33
  239. data/lib/selenium/webdriver/ie/service.rb +5 -9
  240. data/lib/selenium/webdriver/remote.rb +16 -10
  241. data/lib/selenium/webdriver/remote/bridge.rb +38 -42
  242. data/lib/selenium/webdriver/remote/capabilities.rb +25 -7
  243. data/lib/selenium/webdriver/remote/driver.rb +6 -13
  244. data/lib/selenium/webdriver/remote/http/default.rb +10 -6
  245. data/lib/selenium/webdriver/remote/http/persistent.rb +5 -6
  246. data/lib/selenium/webdriver/safari.rb +16 -8
  247. data/lib/selenium/webdriver/safari/bridge.rb +4 -4
  248. data/lib/selenium/webdriver/safari/driver.rb +3 -30
  249. data/lib/selenium/webdriver/safari/options.rb +18 -19
  250. data/lib/selenium/webdriver/safari/service.rb +0 -4
  251. data/lib/selenium/webdriver/support.rb +1 -0
  252. data/lib/selenium/webdriver/support/color.rb +2 -2
  253. data/lib/selenium/webdriver/support/event_firing_bridge.rb +1 -1
  254. data/lib/selenium/webdriver/support/relative_locator.rb +51 -0
  255. data/lib/selenium/webdriver/version.rb +1 -1
  256. data/selenium-webdriver.gemspec +7 -6
  257. metadata +225 -21
  258. data/lib/selenium/webdriver/firefox/binary.rb +0 -110
  259. data/lib/selenium/webdriver/firefox/extension/prefs.json +0 -69
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Selenium
21
21
  module WebDriver
22
- VERSION = '4.0.0.alpha2'
22
+ VERSION = '4.0.0.alpha7'
23
23
  end # WebDriver
24
24
  end # Selenium
@@ -21,25 +21,26 @@ Gem::Specification.new do |s|
21
21
  s.license = 'Apache-2.0'
22
22
  s.homepage = 'https://github.com/SeleniumHQ/selenium'
23
23
  s.metadata = {
24
- 'changelog_uri' => 'https://github.com/SeleniumHQ/selenium/blob/master/rb/CHANGES',
25
- 'source_code_uri' => 'https://github.com/SeleniumHQ/selenium/tree/master/rb'
24
+ 'changelog_uri' => 'https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES',
25
+ 'source_code_uri' => 'https://github.com/SeleniumHQ/selenium/tree/trunk/rb'
26
26
  }
27
27
 
28
28
  s.required_rubygems_version = Gem::Requirement.new('> 1.3.1') if s.respond_to? :required_rubygems_version=
29
- s.required_ruby_version = Gem::Requirement.new('>= 2.4')
29
+ s.required_ruby_version = Gem::Requirement.new('>= 2.5')
30
30
 
31
31
  s.files = Dir[root + '/**/*'].reject { |e| e =~ /ruby\.iml|build\.desc/ }.map { |e| e.sub(root + '/', '') }
32
32
  s.require_paths = ['lib']
33
33
 
34
- s.add_runtime_dependency 'childprocess', ['>= 0.5', '< 2.0']
35
- s.add_runtime_dependency 'rubyzip', ['~> 1.2', '>= 1.2.2']
34
+ s.add_runtime_dependency 'childprocess', ['>= 0.5', '< 5.0']
35
+ s.add_runtime_dependency 'rubyzip', ['>= 1.2.2']
36
+ s.add_runtime_dependency 'websocket', ['~> 1.0']
36
37
 
37
38
  # childprocess requires ffi on windows but doesn't declare it in its dependencies
38
39
  s.add_development_dependency 'ffi'
39
40
  s.add_development_dependency 'rack', ['~> 2.0']
40
41
  s.add_development_dependency 'rake'
41
42
  s.add_development_dependency 'rspec', ['~> 3.0']
42
- s.add_development_dependency 'rubocop', ['~> 0.67.0']
43
+ s.add_development_dependency 'rubocop', ['~> 0.84.0']
43
44
  s.add_development_dependency 'rubocop-performance'
44
45
  s.add_development_dependency 'rubocop-rspec'
45
46
  s.add_development_dependency 'webmock', ['~> 3.5']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selenium-webdriver
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.alpha2
4
+ version: 4.0.0.alpha7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rodionov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-05-02 00:00:00.000000000 Z
13
+ date: 2020-11-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  requirement: !ruby/object:Gem::Requirement
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: '0.5'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '2.0'
23
+ version: '5.0'
24
24
  name: childprocess
25
25
  prerelease: false
26
26
  type: :runtime
@@ -31,13 +31,10 @@ dependencies:
31
31
  version: '0.5'
32
32
  - - "<"
33
33
  - !ruby/object:Gem::Version
34
- version: '2.0'
34
+ version: '5.0'
35
35
  - !ruby/object:Gem::Dependency
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.2'
41
38
  - - ">="
42
39
  - !ruby/object:Gem::Version
43
40
  version: 1.2.2
@@ -46,12 +43,23 @@ dependencies:
46
43
  type: :runtime
47
44
  version_requirements: !ruby/object:Gem::Requirement
48
45
  requirements:
49
- - - "~>"
50
- - !ruby/object:Gem::Version
51
- version: '1.2'
52
46
  - - ">="
53
47
  - !ruby/object:Gem::Version
54
48
  version: 1.2.2
49
+ - !ruby/object:Gem::Dependency
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.0'
55
+ name: websocket
56
+ prerelease: false
57
+ type: :runtime
58
+ version_requirements: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '1.0'
55
63
  - !ruby/object:Gem::Dependency
56
64
  requirement: !ruby/object:Gem::Requirement
57
65
  requirements:
@@ -113,7 +121,7 @@ dependencies:
113
121
  requirements:
114
122
  - - "~>"
115
123
  - !ruby/object:Gem::Version
116
- version: 0.67.0
124
+ version: 0.84.0
117
125
  name: rubocop
118
126
  prerelease: false
119
127
  type: :development
@@ -121,7 +129,7 @@ dependencies:
121
129
  requirements:
122
130
  - - "~>"
123
131
  - !ruby/object:Gem::Version
124
- version: 0.67.0
132
+ version: 0.84.0
125
133
  - !ruby/object:Gem::Dependency
126
134
  requirement: !ruby/object:Gem::Requirement
127
135
  requirements:
@@ -197,8 +205,10 @@ files:
197
205
  - lib/selenium/server.rb
198
206
  - lib/selenium/webdriver.rb
199
207
  - lib/selenium/webdriver/atoms.rb
208
+ - lib/selenium/webdriver/atoms/findElements.js
200
209
  - lib/selenium/webdriver/atoms/getAttribute.js
201
210
  - lib/selenium/webdriver/atoms/isDisplayed.js
211
+ - lib/selenium/webdriver/atoms/mutationListener.js
202
212
  - lib/selenium/webdriver/chrome.rb
203
213
  - lib/selenium/webdriver/chrome/bridge.rb
204
214
  - lib/selenium/webdriver/chrome/driver.rb
@@ -211,8 +221,11 @@ files:
211
221
  - lib/selenium/webdriver/common/driver.rb
212
222
  - lib/selenium/webdriver/common/driver_extensions/downloads_files.rb
213
223
  - lib/selenium/webdriver/common/driver_extensions/has_addons.rb
224
+ - lib/selenium/webdriver/common/driver_extensions/has_authentication.rb
214
225
  - lib/selenium/webdriver/common/driver_extensions/has_debugger.rb
226
+ - lib/selenium/webdriver/common/driver_extensions/has_devtools.rb
215
227
  - lib/selenium/webdriver/common/driver_extensions/has_location.rb
228
+ - lib/selenium/webdriver/common/driver_extensions/has_log_events.rb
216
229
  - lib/selenium/webdriver/common/driver_extensions/has_network_conditions.rb
217
230
  - lib/selenium/webdriver/common/driver_extensions/has_network_connection.rb
218
231
  - lib/selenium/webdriver/common/driver_extensions/has_permissions.rb
@@ -242,29 +255,219 @@ files:
242
255
  - lib/selenium/webdriver/common/logs.rb
243
256
  - lib/selenium/webdriver/common/manager.rb
244
257
  - lib/selenium/webdriver/common/navigation.rb
258
+ - lib/selenium/webdriver/common/options.rb
245
259
  - lib/selenium/webdriver/common/platform.rb
246
260
  - lib/selenium/webdriver/common/port_prober.rb
247
261
  - lib/selenium/webdriver/common/profile_helper.rb
248
262
  - lib/selenium/webdriver/common/proxy.rb
249
263
  - lib/selenium/webdriver/common/search_context.rb
250
264
  - lib/selenium/webdriver/common/service.rb
265
+ - lib/selenium/webdriver/common/service_manager.rb
251
266
  - lib/selenium/webdriver/common/socket_lock.rb
252
267
  - lib/selenium/webdriver/common/socket_poller.rb
268
+ - lib/selenium/webdriver/common/takes_screenshot.rb
253
269
  - lib/selenium/webdriver/common/target_locator.rb
254
270
  - lib/selenium/webdriver/common/timeouts.rb
255
271
  - lib/selenium/webdriver/common/wait.rb
256
272
  - lib/selenium/webdriver/common/window.rb
257
273
  - lib/selenium/webdriver/common/zipper.rb
274
+ - lib/selenium/webdriver/devtools.rb
275
+ - lib/selenium/webdriver/devtools/console_event.rb
276
+ - lib/selenium/webdriver/devtools/exception_event.rb
277
+ - lib/selenium/webdriver/devtools/mutation_event.rb
278
+ - lib/selenium/webdriver/devtools/v84/accessibility.rb
279
+ - lib/selenium/webdriver/devtools/v84/animation.rb
280
+ - lib/selenium/webdriver/devtools/v84/application_cache.rb
281
+ - lib/selenium/webdriver/devtools/v84/audits.rb
282
+ - lib/selenium/webdriver/devtools/v84/background_service.rb
283
+ - lib/selenium/webdriver/devtools/v84/browser.rb
284
+ - lib/selenium/webdriver/devtools/v84/cache_storage.rb
285
+ - lib/selenium/webdriver/devtools/v84/cast.rb
286
+ - lib/selenium/webdriver/devtools/v84/console.rb
287
+ - lib/selenium/webdriver/devtools/v84/css.rb
288
+ - lib/selenium/webdriver/devtools/v84/database.rb
289
+ - lib/selenium/webdriver/devtools/v84/debugger.rb
290
+ - lib/selenium/webdriver/devtools/v84/device_orientation.rb
291
+ - lib/selenium/webdriver/devtools/v84/dom.rb
292
+ - lib/selenium/webdriver/devtools/v84/dom_debugger.rb
293
+ - lib/selenium/webdriver/devtools/v84/dom_snapshot.rb
294
+ - lib/selenium/webdriver/devtools/v84/dom_storage.rb
295
+ - lib/selenium/webdriver/devtools/v84/emulation.rb
296
+ - lib/selenium/webdriver/devtools/v84/fetch.rb
297
+ - lib/selenium/webdriver/devtools/v84/headless_experimental.rb
298
+ - lib/selenium/webdriver/devtools/v84/heap_profiler.rb
299
+ - lib/selenium/webdriver/devtools/v84/indexed_db.rb
300
+ - lib/selenium/webdriver/devtools/v84/input.rb
301
+ - lib/selenium/webdriver/devtools/v84/inspector.rb
302
+ - lib/selenium/webdriver/devtools/v84/io.rb
303
+ - lib/selenium/webdriver/devtools/v84/layer_tree.rb
304
+ - lib/selenium/webdriver/devtools/v84/log.rb
305
+ - lib/selenium/webdriver/devtools/v84/media.rb
306
+ - lib/selenium/webdriver/devtools/v84/memory.rb
307
+ - lib/selenium/webdriver/devtools/v84/network.rb
308
+ - lib/selenium/webdriver/devtools/v84/overlay.rb
309
+ - lib/selenium/webdriver/devtools/v84/page.rb
310
+ - lib/selenium/webdriver/devtools/v84/performance.rb
311
+ - lib/selenium/webdriver/devtools/v84/profiler.rb
312
+ - lib/selenium/webdriver/devtools/v84/runtime.rb
313
+ - lib/selenium/webdriver/devtools/v84/schema.rb
314
+ - lib/selenium/webdriver/devtools/v84/security.rb
315
+ - lib/selenium/webdriver/devtools/v84/service_worker.rb
316
+ - lib/selenium/webdriver/devtools/v84/storage.rb
317
+ - lib/selenium/webdriver/devtools/v84/system_info.rb
318
+ - lib/selenium/webdriver/devtools/v84/target.rb
319
+ - lib/selenium/webdriver/devtools/v84/tethering.rb
320
+ - lib/selenium/webdriver/devtools/v84/tracing.rb
321
+ - lib/selenium/webdriver/devtools/v84/web_audio.rb
322
+ - lib/selenium/webdriver/devtools/v84/web_authn.rb
323
+ - lib/selenium/webdriver/devtools/v85/accessibility.rb
324
+ - lib/selenium/webdriver/devtools/v85/animation.rb
325
+ - lib/selenium/webdriver/devtools/v85/application_cache.rb
326
+ - lib/selenium/webdriver/devtools/v85/audits.rb
327
+ - lib/selenium/webdriver/devtools/v85/background_service.rb
328
+ - lib/selenium/webdriver/devtools/v85/browser.rb
329
+ - lib/selenium/webdriver/devtools/v85/cache_storage.rb
330
+ - lib/selenium/webdriver/devtools/v85/cast.rb
331
+ - lib/selenium/webdriver/devtools/v85/console.rb
332
+ - lib/selenium/webdriver/devtools/v85/css.rb
333
+ - lib/selenium/webdriver/devtools/v85/database.rb
334
+ - lib/selenium/webdriver/devtools/v85/debugger.rb
335
+ - lib/selenium/webdriver/devtools/v85/device_orientation.rb
336
+ - lib/selenium/webdriver/devtools/v85/dom.rb
337
+ - lib/selenium/webdriver/devtools/v85/dom_debugger.rb
338
+ - lib/selenium/webdriver/devtools/v85/dom_snapshot.rb
339
+ - lib/selenium/webdriver/devtools/v85/dom_storage.rb
340
+ - lib/selenium/webdriver/devtools/v85/emulation.rb
341
+ - lib/selenium/webdriver/devtools/v85/fetch.rb
342
+ - lib/selenium/webdriver/devtools/v85/headless_experimental.rb
343
+ - lib/selenium/webdriver/devtools/v85/heap_profiler.rb
344
+ - lib/selenium/webdriver/devtools/v85/indexed_db.rb
345
+ - lib/selenium/webdriver/devtools/v85/input.rb
346
+ - lib/selenium/webdriver/devtools/v85/inspector.rb
347
+ - lib/selenium/webdriver/devtools/v85/io.rb
348
+ - lib/selenium/webdriver/devtools/v85/layer_tree.rb
349
+ - lib/selenium/webdriver/devtools/v85/log.rb
350
+ - lib/selenium/webdriver/devtools/v85/media.rb
351
+ - lib/selenium/webdriver/devtools/v85/memory.rb
352
+ - lib/selenium/webdriver/devtools/v85/network.rb
353
+ - lib/selenium/webdriver/devtools/v85/overlay.rb
354
+ - lib/selenium/webdriver/devtools/v85/page.rb
355
+ - lib/selenium/webdriver/devtools/v85/performance.rb
356
+ - lib/selenium/webdriver/devtools/v85/profiler.rb
357
+ - lib/selenium/webdriver/devtools/v85/runtime.rb
358
+ - lib/selenium/webdriver/devtools/v85/schema.rb
359
+ - lib/selenium/webdriver/devtools/v85/security.rb
360
+ - lib/selenium/webdriver/devtools/v85/service_worker.rb
361
+ - lib/selenium/webdriver/devtools/v85/storage.rb
362
+ - lib/selenium/webdriver/devtools/v85/system_info.rb
363
+ - lib/selenium/webdriver/devtools/v85/target.rb
364
+ - lib/selenium/webdriver/devtools/v85/tethering.rb
365
+ - lib/selenium/webdriver/devtools/v85/tracing.rb
366
+ - lib/selenium/webdriver/devtools/v85/web_audio.rb
367
+ - lib/selenium/webdriver/devtools/v85/web_authn.rb
368
+ - lib/selenium/webdriver/devtools/v86/accessibility.rb
369
+ - lib/selenium/webdriver/devtools/v86/animation.rb
370
+ - lib/selenium/webdriver/devtools/v86/application_cache.rb
371
+ - lib/selenium/webdriver/devtools/v86/audits.rb
372
+ - lib/selenium/webdriver/devtools/v86/background_service.rb
373
+ - lib/selenium/webdriver/devtools/v86/browser.rb
374
+ - lib/selenium/webdriver/devtools/v86/cache_storage.rb
375
+ - lib/selenium/webdriver/devtools/v86/cast.rb
376
+ - lib/selenium/webdriver/devtools/v86/console.rb
377
+ - lib/selenium/webdriver/devtools/v86/css.rb
378
+ - lib/selenium/webdriver/devtools/v86/database.rb
379
+ - lib/selenium/webdriver/devtools/v86/debugger.rb
380
+ - lib/selenium/webdriver/devtools/v86/device_orientation.rb
381
+ - lib/selenium/webdriver/devtools/v86/dom.rb
382
+ - lib/selenium/webdriver/devtools/v86/dom_debugger.rb
383
+ - lib/selenium/webdriver/devtools/v86/dom_snapshot.rb
384
+ - lib/selenium/webdriver/devtools/v86/dom_storage.rb
385
+ - lib/selenium/webdriver/devtools/v86/emulation.rb
386
+ - lib/selenium/webdriver/devtools/v86/fetch.rb
387
+ - lib/selenium/webdriver/devtools/v86/headless_experimental.rb
388
+ - lib/selenium/webdriver/devtools/v86/heap_profiler.rb
389
+ - lib/selenium/webdriver/devtools/v86/indexed_db.rb
390
+ - lib/selenium/webdriver/devtools/v86/input.rb
391
+ - lib/selenium/webdriver/devtools/v86/inspector.rb
392
+ - lib/selenium/webdriver/devtools/v86/io.rb
393
+ - lib/selenium/webdriver/devtools/v86/layer_tree.rb
394
+ - lib/selenium/webdriver/devtools/v86/log.rb
395
+ - lib/selenium/webdriver/devtools/v86/media.rb
396
+ - lib/selenium/webdriver/devtools/v86/memory.rb
397
+ - lib/selenium/webdriver/devtools/v86/network.rb
398
+ - lib/selenium/webdriver/devtools/v86/overlay.rb
399
+ - lib/selenium/webdriver/devtools/v86/page.rb
400
+ - lib/selenium/webdriver/devtools/v86/performance.rb
401
+ - lib/selenium/webdriver/devtools/v86/profiler.rb
402
+ - lib/selenium/webdriver/devtools/v86/runtime.rb
403
+ - lib/selenium/webdriver/devtools/v86/schema.rb
404
+ - lib/selenium/webdriver/devtools/v86/security.rb
405
+ - lib/selenium/webdriver/devtools/v86/service_worker.rb
406
+ - lib/selenium/webdriver/devtools/v86/storage.rb
407
+ - lib/selenium/webdriver/devtools/v86/system_info.rb
408
+ - lib/selenium/webdriver/devtools/v86/target.rb
409
+ - lib/selenium/webdriver/devtools/v86/tethering.rb
410
+ - lib/selenium/webdriver/devtools/v86/tracing.rb
411
+ - lib/selenium/webdriver/devtools/v86/web_audio.rb
412
+ - lib/selenium/webdriver/devtools/v86/web_authn.rb
413
+ - lib/selenium/webdriver/devtools/v87/accessibility.rb
414
+ - lib/selenium/webdriver/devtools/v87/animation.rb
415
+ - lib/selenium/webdriver/devtools/v87/application_cache.rb
416
+ - lib/selenium/webdriver/devtools/v87/audits.rb
417
+ - lib/selenium/webdriver/devtools/v87/background_service.rb
418
+ - lib/selenium/webdriver/devtools/v87/browser.rb
419
+ - lib/selenium/webdriver/devtools/v87/cache_storage.rb
420
+ - lib/selenium/webdriver/devtools/v87/cast.rb
421
+ - lib/selenium/webdriver/devtools/v87/console.rb
422
+ - lib/selenium/webdriver/devtools/v87/css.rb
423
+ - lib/selenium/webdriver/devtools/v87/database.rb
424
+ - lib/selenium/webdriver/devtools/v87/debugger.rb
425
+ - lib/selenium/webdriver/devtools/v87/device_orientation.rb
426
+ - lib/selenium/webdriver/devtools/v87/dom.rb
427
+ - lib/selenium/webdriver/devtools/v87/dom_debugger.rb
428
+ - lib/selenium/webdriver/devtools/v87/dom_snapshot.rb
429
+ - lib/selenium/webdriver/devtools/v87/dom_storage.rb
430
+ - lib/selenium/webdriver/devtools/v87/emulation.rb
431
+ - lib/selenium/webdriver/devtools/v87/fetch.rb
432
+ - lib/selenium/webdriver/devtools/v87/headless_experimental.rb
433
+ - lib/selenium/webdriver/devtools/v87/heap_profiler.rb
434
+ - lib/selenium/webdriver/devtools/v87/indexed_db.rb
435
+ - lib/selenium/webdriver/devtools/v87/input.rb
436
+ - lib/selenium/webdriver/devtools/v87/inspector.rb
437
+ - lib/selenium/webdriver/devtools/v87/io.rb
438
+ - lib/selenium/webdriver/devtools/v87/layer_tree.rb
439
+ - lib/selenium/webdriver/devtools/v87/log.rb
440
+ - lib/selenium/webdriver/devtools/v87/media.rb
441
+ - lib/selenium/webdriver/devtools/v87/memory.rb
442
+ - lib/selenium/webdriver/devtools/v87/network.rb
443
+ - lib/selenium/webdriver/devtools/v87/overlay.rb
444
+ - lib/selenium/webdriver/devtools/v87/page.rb
445
+ - lib/selenium/webdriver/devtools/v87/performance.rb
446
+ - lib/selenium/webdriver/devtools/v87/profiler.rb
447
+ - lib/selenium/webdriver/devtools/v87/runtime.rb
448
+ - lib/selenium/webdriver/devtools/v87/schema.rb
449
+ - lib/selenium/webdriver/devtools/v87/security.rb
450
+ - lib/selenium/webdriver/devtools/v87/service_worker.rb
451
+ - lib/selenium/webdriver/devtools/v87/storage.rb
452
+ - lib/selenium/webdriver/devtools/v87/system_info.rb
453
+ - lib/selenium/webdriver/devtools/v87/target.rb
454
+ - lib/selenium/webdriver/devtools/v87/tethering.rb
455
+ - lib/selenium/webdriver/devtools/v87/tracing.rb
456
+ - lib/selenium/webdriver/devtools/v87/web_audio.rb
457
+ - lib/selenium/webdriver/devtools/v87/web_authn.rb
258
458
  - lib/selenium/webdriver/edge.rb
259
- - lib/selenium/webdriver/edge/driver.rb
260
- - lib/selenium/webdriver/edge/options.rb
261
- - lib/selenium/webdriver/edge/service.rb
459
+ - lib/selenium/webdriver/edge_chrome/bridge.rb
460
+ - lib/selenium/webdriver/edge_chrome/driver.rb
461
+ - lib/selenium/webdriver/edge_chrome/options.rb
462
+ - lib/selenium/webdriver/edge_chrome/profile.rb
463
+ - lib/selenium/webdriver/edge_chrome/service.rb
464
+ - lib/selenium/webdriver/edge_html/driver.rb
465
+ - lib/selenium/webdriver/edge_html/options.rb
466
+ - lib/selenium/webdriver/edge_html/service.rb
262
467
  - lib/selenium/webdriver/firefox.rb
263
- - lib/selenium/webdriver/firefox/binary.rb
264
468
  - lib/selenium/webdriver/firefox/bridge.rb
265
469
  - lib/selenium/webdriver/firefox/driver.rb
266
470
  - lib/selenium/webdriver/firefox/extension.rb
267
- - lib/selenium/webdriver/firefox/extension/prefs.json
268
471
  - lib/selenium/webdriver/firefox/options.rb
269
472
  - lib/selenium/webdriver/firefox/profile.rb
270
473
  - lib/selenium/webdriver/firefox/profiles_ini.rb
@@ -295,6 +498,7 @@ files:
295
498
  - lib/selenium/webdriver/support/color.rb
296
499
  - lib/selenium/webdriver/support/escaper.rb
297
500
  - lib/selenium/webdriver/support/event_firing_bridge.rb
501
+ - lib/selenium/webdriver/support/relative_locator.rb
298
502
  - lib/selenium/webdriver/support/select.rb
299
503
  - lib/selenium/webdriver/version.rb
300
504
  - selenium-webdriver.gemspec
@@ -302,8 +506,8 @@ homepage: https://github.com/SeleniumHQ/selenium
302
506
  licenses:
303
507
  - Apache-2.0
304
508
  metadata:
305
- changelog_uri: https://github.com/SeleniumHQ/selenium/blob/master/rb/CHANGES
306
- source_code_uri: https://github.com/SeleniumHQ/selenium/tree/master/rb
509
+ changelog_uri: https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES
510
+ source_code_uri: https://github.com/SeleniumHQ/selenium/tree/trunk/rb
307
511
  post_install_message:
308
512
  rdoc_options: []
309
513
  require_paths:
@@ -312,7 +516,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
312
516
  requirements:
313
517
  - - ">="
314
518
  - !ruby/object:Gem::Version
315
- version: '2.4'
519
+ version: '2.5'
316
520
  required_rubygems_version: !ruby/object:Gem::Requirement
317
521
  requirements:
318
522
  - - ">"
@@ -320,7 +524,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
320
524
  version: 1.3.1
321
525
  requirements: []
322
526
  rubyforge_project:
323
- rubygems_version: 2.6.14
527
+ rubygems_version: 2.7.9
324
528
  signing_key:
325
529
  specification_version: 4
326
530
  summary: The next generation developer focused tool for automated testing of webapps
@@ -1,110 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Licensed to the Software Freedom Conservancy (SFC) under one
4
- # or more contributor license agreements. See the NOTICE file
5
- # distributed with this work for additional information
6
- # regarding copyright ownership. The SFC licenses this file
7
- # to you under the Apache License, Version 2.0 (the
8
- # "License"); you may not use this file except in compliance
9
- # with the License. You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing,
14
- # software distributed under the License is distributed on an
15
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- # KIND, either express or implied. See the License for the
17
- # specific language governing permissions and limitations
18
- # under the License.
19
-
20
- module Selenium
21
- module WebDriver
22
- module Firefox
23
- # @api private
24
- class Binary
25
- class << self
26
- #
27
- # @api private
28
- #
29
- # @see Firefox.path=
30
- #
31
-
32
- def path=(path)
33
- Platform.assert_executable(path)
34
- @path = path
35
- end
36
-
37
- def reset_path!
38
- @path = nil
39
- end
40
-
41
- def path
42
- @path ||= case Platform.os
43
- when :macosx
44
- macosx_path
45
- when :windows
46
- windows_path
47
- when :linux, :unix
48
- Platform.find_binary('firefox3', 'firefox2', 'firefox') || '/usr/bin/firefox'
49
- else
50
- raise Error::WebDriverError, "unknown platform: #{Platform.os}"
51
- end
52
-
53
- @path = Platform.cygwin_path(@path, windows: true) if Platform.cygwin?
54
-
55
- unless File.file?(@path.to_s)
56
- error = "Could not find Firefox binary (os=#{Platform.os}). "
57
- error << "Make sure Firefox is installed or set the path manually with #{self}.path="
58
- raise Error::WebDriverError, error
59
- end
60
-
61
- @path
62
- end
63
-
64
- def version
65
- @version = case Platform.os
66
- when :macosx
67
- `#{path} -v`.strip[/[^\s]*$/][/^\d+/].to_i
68
- when :windows
69
- `\"#{path}\" -v | more`.strip[/[^\s]*$/][/^\d+/].to_i
70
- when :linux
71
- `#{path} -v`.strip[/[^\s]*$/][/^\d+/].to_i
72
- else
73
- 0
74
- end
75
- end
76
-
77
- private
78
-
79
- def windows_path
80
- windows_registry_path ||
81
- Platform.find_in_program_files('\\Mozilla Firefox\\firefox.exe') ||
82
- Platform.find_binary('firefox')
83
- end
84
-
85
- def macosx_path
86
- path = '/Applications/Firefox.app/Contents/MacOS/firefox-bin'
87
- path = File.expand_path('~/Applications/Firefox.app/Contents/MacOS/firefox-bin') unless File.exist?(path)
88
- path = Platform.find_binary('firefox-bin') unless File.exist?(path)
89
-
90
- path
91
- end
92
-
93
- def windows_registry_path
94
- require 'win32/registry'
95
-
96
- lm = Win32::Registry::HKEY_LOCAL_MACHINE
97
- lm.open('SOFTWARE\\Mozilla\\Mozilla Firefox') do |reg|
98
- main = lm.open("SOFTWARE\\Mozilla\\Mozilla Firefox\\#{reg.keys[0]}\\Main")
99
- entry = main.find { |key, _type, _data| /pathtoexe/i.match? key }
100
- return entry.last if entry
101
- end
102
- rescue LoadError
103
- # older JRuby or IronRuby does not have win32/registry
104
- rescue Win32::Registry::Error
105
- end
106
- end # class << self
107
- end # Binary
108
- end # Firefox
109
- end # WebDriver
110
- end # Selenium