selenium-webdriver 4.1.0 → 4.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (172) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +405 -1
  3. data/Gemfile +3 -0
  4. data/LICENSE +1 -1
  5. data/NOTICE +1 -1
  6. data/README.md +3 -3
  7. data/bin/linux/selenium-manager +0 -0
  8. data/bin/macos/selenium-manager +0 -0
  9. data/bin/windows/selenium-manager.exe +0 -0
  10. data/lib/selenium/server.rb +38 -40
  11. data/lib/selenium/webdriver/atoms/findElements.js +27 -27
  12. data/lib/selenium/webdriver/atoms/getAttribute.js +6 -100
  13. data/lib/selenium/webdriver/atoms/isDisplayed.js +24 -96
  14. data/lib/selenium/webdriver/atoms/mutationListener.js +0 -0
  15. data/lib/selenium/webdriver/atoms.rb +5 -3
  16. data/lib/selenium/webdriver/bidi/browsing_context.rb +88 -0
  17. data/lib/selenium/webdriver/bidi/browsing_context_info.rb +35 -0
  18. data/lib/selenium/webdriver/bidi/log/base_log_entry.rb +35 -0
  19. data/lib/selenium/webdriver/bidi/log/console_log_entry.rb +35 -0
  20. data/lib/selenium/webdriver/{common/driver_extensions/has_location.rb → bidi/log/filter_by.rb} +14 -11
  21. data/lib/selenium/webdriver/bidi/log/generic_log_entry.rb +33 -0
  22. data/lib/selenium/webdriver/bidi/log/javascript_log_entry.rb +33 -0
  23. data/lib/selenium/webdriver/bidi/log_handler.rb +63 -0
  24. data/lib/selenium/webdriver/bidi/log_inspector.rb +147 -0
  25. data/lib/selenium/webdriver/bidi/navigate_result.rb +33 -0
  26. data/lib/selenium/webdriver/bidi/session.rb +51 -0
  27. data/lib/selenium/webdriver/bidi/struct.rb +44 -0
  28. data/lib/selenium/webdriver/bidi.rb +66 -0
  29. data/lib/selenium/webdriver/chrome/driver.rb +9 -29
  30. data/lib/selenium/webdriver/chrome/features.rb +9 -67
  31. data/lib/selenium/webdriver/chrome/options.rb +3 -223
  32. data/lib/selenium/webdriver/chrome/profile.rb +3 -83
  33. data/lib/selenium/webdriver/chrome/service.rb +4 -19
  34. data/lib/selenium/webdriver/chrome.rb +0 -16
  35. data/lib/selenium/webdriver/chromium/driver.rb +61 -0
  36. data/lib/selenium/webdriver/chromium/features.rb +99 -0
  37. data/lib/selenium/webdriver/chromium/options.rb +243 -0
  38. data/lib/selenium/webdriver/chromium/profile.rb +113 -0
  39. data/lib/selenium/webdriver/chromium.rb +29 -0
  40. data/lib/selenium/webdriver/common/action_builder.rb +60 -22
  41. data/lib/selenium/webdriver/common/child_process.rb +130 -0
  42. data/lib/selenium/webdriver/common/driver.rb +46 -90
  43. data/lib/selenium/webdriver/common/driver_extensions/downloads_files.rb +0 -2
  44. data/lib/selenium/webdriver/common/driver_extensions/full_page_screenshot.rb +0 -1
  45. data/lib/selenium/webdriver/common/driver_extensions/has_addons.rb +0 -2
  46. data/lib/selenium/webdriver/common/driver_extensions/has_apple_permissions.rb +0 -2
  47. data/lib/selenium/webdriver/common/driver_extensions/has_authentication.rb +0 -2
  48. data/lib/selenium/webdriver/common/driver_extensions/{has_remote_status.rb → has_bidi.rb} +10 -5
  49. data/lib/selenium/webdriver/common/driver_extensions/has_casting.rb +10 -1
  50. data/lib/selenium/webdriver/common/driver_extensions/has_cdp.rb +0 -2
  51. data/lib/selenium/webdriver/common/driver_extensions/has_context.rb +1 -4
  52. data/lib/selenium/webdriver/common/driver_extensions/has_debugger.rb +0 -2
  53. data/lib/selenium/webdriver/common/driver_extensions/has_devtools.rb +0 -2
  54. data/lib/selenium/webdriver/common/driver_extensions/has_fedcm_dialog.rb +55 -0
  55. data/lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb +65 -0
  56. data/lib/selenium/webdriver/common/driver_extensions/has_launching.rb +0 -2
  57. data/lib/selenium/webdriver/common/driver_extensions/has_log_events.rb +2 -3
  58. data/lib/selenium/webdriver/common/driver_extensions/has_network_conditions.rb +0 -2
  59. data/lib/selenium/webdriver/common/driver_extensions/has_network_interception.rb +2 -69
  60. data/lib/selenium/webdriver/common/driver_extensions/has_permissions.rb +0 -2
  61. data/lib/selenium/webdriver/common/driver_extensions/has_pinned_scripts.rb +1 -3
  62. data/lib/selenium/webdriver/common/driver_finder.rb +97 -0
  63. data/lib/selenium/webdriver/common/element.rb +8 -8
  64. data/lib/selenium/webdriver/common/error.rb +27 -4
  65. data/lib/selenium/webdriver/common/fedcm/account.rb +50 -0
  66. data/lib/selenium/webdriver/common/fedcm/dialog.rb +74 -0
  67. data/lib/selenium/webdriver/common/fedcm.rb +27 -0
  68. data/lib/selenium/webdriver/common/html5/shared_web_storage.rb +2 -2
  69. data/lib/selenium/webdriver/common/interactions/input_device.rb +10 -4
  70. data/lib/selenium/webdriver/common/interactions/interaction.rb +12 -25
  71. data/lib/selenium/webdriver/common/interactions/interactions.rb +24 -4
  72. data/lib/selenium/webdriver/common/interactions/key_actions.rb +5 -1
  73. data/lib/selenium/webdriver/common/interactions/key_input.rb +11 -27
  74. data/lib/selenium/webdriver/common/interactions/none_input.rb +10 -8
  75. data/lib/selenium/webdriver/common/interactions/pause.rb +49 -0
  76. data/lib/selenium/webdriver/common/interactions/pointer_actions.rb +59 -71
  77. data/lib/selenium/webdriver/common/{driver_extensions/has_network_connection.rb → interactions/pointer_cancel.rb} +19 -11
  78. data/lib/selenium/webdriver/common/interactions/pointer_event_properties.rb +63 -0
  79. data/lib/selenium/webdriver/common/interactions/pointer_input.rb +15 -84
  80. data/lib/selenium/webdriver/common/interactions/pointer_move.rb +60 -0
  81. data/lib/selenium/webdriver/common/interactions/pointer_press.rb +85 -0
  82. data/lib/selenium/webdriver/common/interactions/scroll.rb +59 -0
  83. data/lib/selenium/webdriver/common/interactions/scroll_origin.rb +48 -0
  84. data/lib/selenium/webdriver/common/interactions/typing_interaction.rb +54 -0
  85. data/lib/selenium/webdriver/common/interactions/wheel_actions.rb +114 -0
  86. data/lib/selenium/webdriver/common/interactions/wheel_input.rb +42 -0
  87. data/lib/selenium/webdriver/common/keys.rb +1 -0
  88. data/lib/selenium/webdriver/common/local_driver.rb +53 -0
  89. data/lib/selenium/webdriver/common/logger.rb +93 -28
  90. data/lib/selenium/webdriver/common/manager.rb +1 -28
  91. data/lib/selenium/webdriver/common/options.rb +19 -19
  92. data/lib/selenium/webdriver/common/platform.rb +12 -52
  93. data/lib/selenium/webdriver/common/port_prober.rb +1 -1
  94. data/lib/selenium/webdriver/common/profile_helper.rb +1 -1
  95. data/lib/selenium/webdriver/common/proxy.rb +4 -4
  96. data/lib/selenium/webdriver/common/script.rb +45 -0
  97. data/lib/selenium/webdriver/common/search_context.rb +10 -8
  98. data/lib/selenium/webdriver/common/selenium_manager.rb +104 -0
  99. data/lib/selenium/webdriver/common/service.rb +21 -30
  100. data/lib/selenium/webdriver/common/service_manager.rb +8 -15
  101. data/lib/selenium/webdriver/common/shadow_root.rb +2 -3
  102. data/lib/selenium/webdriver/common/socket_lock.rb +3 -3
  103. data/lib/selenium/webdriver/common/socket_poller.rb +3 -3
  104. data/lib/selenium/webdriver/common/takes_screenshot.rb +6 -5
  105. data/lib/selenium/webdriver/common/target_locator.rb +2 -3
  106. data/lib/selenium/webdriver/common/timeouts.rb +2 -2
  107. data/lib/selenium/webdriver/common/virtual_authenticator/credential.rb +85 -0
  108. data/lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator.rb +72 -0
  109. data/lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator_options.rb +62 -0
  110. data/lib/selenium/webdriver/common/websocket_connection.rb +176 -0
  111. data/lib/selenium/webdriver/common/window.rb +6 -6
  112. data/lib/selenium/webdriver/common/zipper.rb +1 -1
  113. data/lib/selenium/webdriver/common.rb +26 -5
  114. data/lib/selenium/webdriver/devtools/console_event.rb +0 -2
  115. data/lib/selenium/webdriver/devtools/exception_event.rb +0 -2
  116. data/lib/selenium/webdriver/devtools/mutation_event.rb +0 -2
  117. data/lib/selenium/webdriver/devtools/network_interceptor.rb +173 -0
  118. data/lib/selenium/webdriver/devtools/pinned_script.rb +0 -2
  119. data/lib/selenium/webdriver/devtools/request.rb +1 -3
  120. data/lib/selenium/webdriver/devtools/response.rb +1 -3
  121. data/lib/selenium/webdriver/devtools.rb +17 -114
  122. data/lib/selenium/webdriver/edge/driver.rb +9 -3
  123. data/lib/selenium/webdriver/edge/features.rb +8 -4
  124. data/lib/selenium/webdriver/edge/options.rb +17 -5
  125. data/lib/selenium/webdriver/edge/profile.rb +2 -2
  126. data/lib/selenium/webdriver/edge/service.rb +8 -7
  127. data/lib/selenium/webdriver/edge.rb +0 -2
  128. data/lib/selenium/webdriver/firefox/driver.rb +9 -2
  129. data/lib/selenium/webdriver/firefox/features.rb +11 -7
  130. data/lib/selenium/webdriver/firefox/options.rb +10 -16
  131. data/lib/selenium/webdriver/firefox/profile.rb +21 -17
  132. data/lib/selenium/webdriver/firefox/profiles_ini.rb +1 -1
  133. data/lib/selenium/webdriver/firefox/service.rb +0 -18
  134. data/lib/selenium/webdriver/firefox/util.rb +46 -0
  135. data/lib/selenium/webdriver/firefox.rb +1 -14
  136. data/lib/selenium/webdriver/ie/driver.rb +7 -1
  137. data/lib/selenium/webdriver/ie/features.rb +34 -0
  138. data/lib/selenium/webdriver/ie/options.rb +6 -4
  139. data/lib/selenium/webdriver/ie/service.rb +0 -22
  140. data/lib/selenium/webdriver/ie.rb +4 -17
  141. data/lib/selenium/webdriver/remote/bidi_bridge.rb +44 -0
  142. data/lib/selenium/webdriver/remote/{commands.rb → bridge/commands.rb} +22 -9
  143. data/lib/selenium/webdriver/remote/bridge/locator_converter.rb +76 -0
  144. data/lib/selenium/webdriver/remote/bridge.rb +147 -99
  145. data/lib/selenium/webdriver/remote/capabilities.rb +5 -55
  146. data/lib/selenium/webdriver/remote/driver.rb +35 -14
  147. data/lib/selenium/webdriver/remote/features.rb +75 -0
  148. data/lib/selenium/webdriver/remote/http/common.rb +24 -6
  149. data/lib/selenium/webdriver/remote/http/curb.rb +1 -3
  150. data/lib/selenium/webdriver/remote/http/default.rb +8 -14
  151. data/lib/selenium/webdriver/remote/response.rb +8 -34
  152. data/lib/selenium/webdriver/remote/server_error.rb +2 -2
  153. data/lib/selenium/webdriver/remote.rb +2 -1
  154. data/lib/selenium/webdriver/safari/driver.rb +7 -1
  155. data/lib/selenium/webdriver/safari/features.rb +5 -3
  156. data/lib/selenium/webdriver/safari/options.rb +5 -1
  157. data/lib/selenium/webdriver/safari/service.rb +10 -4
  158. data/lib/selenium/webdriver/safari.rb +1 -15
  159. data/lib/selenium/webdriver/support/color.rb +22 -22
  160. data/lib/selenium/webdriver/support/event_firing_bridge.rb +4 -4
  161. data/lib/selenium/webdriver/support/guards/guard.rb +14 -14
  162. data/lib/selenium/webdriver/support/guards/guard_condition.rb +1 -3
  163. data/lib/selenium/webdriver/support/guards.rb +2 -2
  164. data/lib/selenium/webdriver/support/relative_locator.rb +0 -1
  165. data/lib/selenium/webdriver/support/select.rb +3 -1
  166. data/lib/selenium/webdriver/version.rb +1 -1
  167. data/lib/selenium/webdriver.rb +7 -5
  168. data/selenium-webdriver.gemspec +20 -16
  169. metadata +135 -47
  170. data/lib/selenium/webdriver/remote/http/persistent.rb +0 -65
  171. data/lib/selenium/webdriver/support/cdp/domain.rb.erb +0 -63
  172. data/lib/selenium/webdriver/support/cdp_client_generator.rb +0 -108
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40e4bef1fdee7ae817c56466ec231be400d677d56a8c8f46b797c6b3eba28de9
4
- data.tar.gz: a9c1af31f12db6096f06c2a89e487e40ea2bb53b8f6e46e5f77a3046f149bb34
3
+ metadata.gz: 6eff1b0194347648ce4b4e5f2e5871f2fdfdeb85fa00edb762db57f480aeb3e0
4
+ data.tar.gz: d2d6c02c0357e5b52f0e843a704a554c0bf853d5b16c76bf6ed909614c0d62f1
5
5
  SHA512:
6
- metadata.gz: b5325d0fe9f5fdb721ed4a6daa1384d7876dc7a072dd52f46c73d76b1614434c123fff2b4a9d7de01538968eddfbad57f2e1a87f4dce0e560a850dcf21988840
7
- data.tar.gz: 3b345ac66d051c32267d1c4ef9b2dd70aea36e2c4e5bb35ce30197d748effca8fed460824d1961ad5a39340358fc9be3f200708a38557e5e878b09be1b0d61c0
6
+ metadata.gz: 4d7fa72ea30b744c7fd5eb6ddaa7c61b889a1dc5f0d21ef36d6e03fa7ad983e94c0ac071e7a6f0c6942e6d3d43722923d1b8d33ac1b83c43597ea5f153ebc275
7
+ data.tar.gz: 1288baedcdaea282540c55457eff420891b3fabe8b791a62a22b71a0fdd4c6da6e16b1f3a9d83056d684ea8a2efe1f674a40f206ef8ad9b659fcded049dd9695
data/CHANGES CHANGED
@@ -1,4 +1,408 @@
1
- 4.1.0 (2021-11-18)
1
+ 4.23.0 (2024-07-18)
2
+ =========================
3
+ * Add FedCM support to the ruby selenium client (#13796)
4
+ * Add URLs constant to update error messages (#14174)
5
+ * Update selenium manager types (#14189)
6
+ * Add backtrace locations and cause to errors (#14170)
7
+ * Add CDP for Chrome 127 and remove 124
8
+
9
+ 4.22.0 (2024-06-20)
10
+ =========================
11
+
12
+ * Force UTF-8 encoding on logger (see #6937)
13
+ * Don't crash when ChildProcess is already killed (see #14032)
14
+ * Manage bidi instance on the bridge not the driver (#14071)
15
+ * Implement High Level Logging API with BiDi (#14073)
16
+ * Fix bug with message deletion in Guard class
17
+ * Change output for Guard class
18
+ * Implement toggle for BiDi and Classic implementations (#14092)
19
+ * Add preference to enable CDP in Firefox by default (#14091)
20
+ * Add support for the w3c silent option for the ruby library (#14152)
21
+ * Add CDP for Chrome 126 and remove 123
22
+
23
+ 4.21.1 (2024-05-16)
24
+ =========================
25
+
26
+ * Fixed missing Chrome binary error in Rails system tests.
27
+
28
+ 4.21.0 (2024-05-16)
29
+ =========================
30
+
31
+ * Add CDP for Chrome 125 and remove 122
32
+ * Initial extensibility points for Appium
33
+ * Support registering extra headers in HTTP client
34
+ * Support overriding User-Agent in HTTP client
35
+ * Support registering extra bridge commands
36
+ * Support overriding default locator conversion
37
+ * Support registering custom finders for SearchContext
38
+ * Support using custom element classes
39
+
40
+ 4.20.1 (2024-04-25)
41
+ =========================
42
+
43
+ * Returned accidentally removed DriverFinder.path and deprecated it.
44
+
45
+ 4.20.0 (2024-04-24)
46
+ =========================
47
+
48
+ * Add CDP for Chrome 124 and remove 121
49
+ * Making Selenium Manager a thin wrapper (#13386)
50
+ * This change has been made to make it easier to maintain and improve, the interface has
51
+ changed and if users were invoking it, they might experience issues. Selenium Manager is
52
+ still in beta and these type of changes are expected.
53
+
54
+ 4.19.0 (2024-03-27)
55
+ =========================
56
+
57
+ * Add CDP for Chrome 123 and remove 120
58
+ * Avoid over-escaping browser path (#13632)
59
+ * Add full RBS support (#13234)
60
+
61
+ 4.18.1 (2024-02-19)
62
+ =========================
63
+
64
+ * Add CDP for Chrome 122 and remove 119
65
+
66
+ 4.18.0 (2024-02-19)
67
+ =========================
68
+
69
+ * Update documentation link in readme (#13570)
70
+ * make suggested updates from rubocop
71
+
72
+ 4.17.0 (2024-01-22)
73
+ =========================
74
+
75
+ * Logger defaults output to stderr instead of stdout
76
+ * Fully support Chrome 120+ old headless mode (#13271)
77
+ * Add ruby to Selenium Manager input for tracking (see #13288)
78
+ * Define default command_list (fixes #13307)
79
+ * Fix issues with incorrectly named edge browser
80
+ * Check for whether driver supports full page screenshots to error (#12799)
81
+ * Add CDP for Chrome 121 and remove 118
82
+
83
+ 4.16.0 (2023-12-06)
84
+ =========================
85
+
86
+ Ruby:
87
+ * Add RBS files to Ruby (#12844)
88
+ * Convert binary locations for cygwin (#12618)
89
+ * Allow Selenium Manager to work with Unix (#13161)
90
+ * Extend RBS support for logger and log entry (#13192)
91
+ * Update rules_ruby to the latest version (#13235)
92
+
93
+ BiDi:
94
+ * Released selenium-devtools 0.120.0 (supports CDP v85, v118, v119, v120)
95
+
96
+ Chrome:
97
+ * Fix http proxy configuration for chrome (#13093)
98
+
99
+ Firefox:
100
+ * Delete 'lock' file in FF profile (#13090)
101
+
102
+ 4.15.0 (2023-11-01)
103
+ =========================
104
+
105
+ * Do not set browser binary in selenium manager if it is an empty string (#12738)
106
+ * Add flaky condition to guards to mark unreliable tests
107
+ * Rake update needs to build latest grid for running remote tests
108
+ * Add CDP v119 and remove v116
109
+ * Implement file downloads (#12979)
110
+
111
+ 4.14.0 (2023-10-09)
112
+ =========================
113
+ Ruby:
114
+ * allow users to access the full script of the atom directly
115
+
116
+ BiDi:
117
+ * Released selenium-devtools 0.118.0 (supports CDP v85, v116, v117, v118)
118
+
119
+ 4.13.1 (2023-09-25)
120
+ =========================
121
+ Ruby:
122
+ * Fix bug preventing logging chromedriver to file
123
+
124
+ 4.13.0 (2023-09-25)
125
+ =========================
126
+ Ruby:
127
+ * Fix bug preventing using performance logging with chromium
128
+ * Allow users to set Selenium Manager path by environment variable (#12752)
129
+ * Allow service to be started before the driver
130
+ * remove deprecated driver extensions for location and network connection
131
+
132
+ BiDi:
133
+ * Released selenium-devtools 0.117.0 (supports CDP v85, v115, v116, v117)
134
+
135
+ 4.12.0 (2023-08-31)
136
+ =========================
137
+ Ruby:
138
+ * Fix bug preventing good error messages in Selenium Manager when stdout empty
139
+ * Fix bug with Firefox not loading net/http library by default (#12506)
140
+ * Remove support for using capabilities in local drivers
141
+
142
+ BiDi:
143
+ * Released selenium-devtools 0.116.0 (supports CDP v85, v114, v115, v116)
144
+
145
+ 4.11.0 (2023-07-31)
146
+ =========================
147
+ Ruby:
148
+ * Made network interception threads fail silently (#12226)
149
+ * Have Selenium Manager binary locate drivers on PATH (#12345)
150
+ * Add browser output from selenium manager to options (#12398)
151
+ * Remove deprecated code (#12417)
152
+ BiDi:
153
+ * Released selenium-devtools 0.115.0 (supports CDP v85, v113, v114, v115)
154
+ Edge:
155
+ * Adding ignore process match for IE Mode across bindings (#12279)
156
+
157
+ 4.10.0 (2023-06-07)
158
+ =========================
159
+ Ruby:
160
+ * Implement proxy support for Selenium Manager
161
+ * Prevent setting driver log level in Safari
162
+ * Change all Selenium Manager logging to :debug (#12145)
163
+ * Error messages include links to documentation
164
+ * Add custom error class for driver location and improve error logic
165
+
166
+ BiDi:
167
+ * Released selenium-devtools 0.114.0 (supports CDP v85, v112, v113, v114)
168
+
169
+ Edge:
170
+ * Add support for webview2
171
+
172
+ 4.9.1 (2023-05-08)
173
+ =========================
174
+ Ruby:
175
+ * Allow users to specify driver process output in Service class (#11964)
176
+ * Updated minimum required Ruby version to 3.0
177
+ * Selenium Logger defaults to :info and all debugging is now logged as :debug (#11967)
178
+ * Every logging entry can be ignored based on ID, not just warnings
179
+ * Logging entries can be filtered to allow or ignore specific IDs
180
+
181
+ BiDi:
182
+ * Fix bug with loading devtools (#11931) (thanks Boris Petrov!)
183
+ * Released selenium-devtools 0.113.0 (supports CDP v85, v111, v112, v113)
184
+
185
+ 4.9.0 (2023-04-21)
186
+ =========================
187
+ Ruby:
188
+ * Fix devtools version fallback (#11869)
189
+ * Fix bug in selenium manager escaping back slashes in Windows (#11884)
190
+
191
+ BiDi:
192
+ * Released selenium-devtools 0.112.0 (supports CDP v85, v110, v111, v112)
193
+
194
+ 4.8.6 (2023-03-29)
195
+ =========================
196
+ Ruby:
197
+ * Properly escape arguments passed to Selenium Manager
198
+
199
+ 4.8.5 (2023-03-28)
200
+ =========================
201
+ Ruby:
202
+ * Wrapping browser name in quotes when calling Selenium Manager
203
+
204
+ 4.8.4 (2023-03-28)
205
+ =========================
206
+ Ruby:
207
+ * Update the selenium-manager versions to fix an IE naming issue (#11828)
208
+
209
+ 4.8.3 (2023-03-26)
210
+ =========================
211
+ Ruby:
212
+ * Still need to use driver finder when using capabilities parameter
213
+ * Accommodate Driver Finder being sent something other than an Options instance
214
+
215
+ 4.8.2 (2023-03-24)
216
+ =========================
217
+ Ruby:
218
+ * Ruby driver finder (#11523)
219
+ * Using json output with Selenium Manager
220
+
221
+ BiDi:
222
+ * Released selenium-devtools 0.111.0 (supports CDP v85, v109, v110, v111)
223
+
224
+ 4.8.1 (2023-02-17)
225
+ =========================
226
+ Ruby:
227
+ * Fix autoload of WebDriver::Remote::Bridge::COMMANDS
228
+ * Subclass is setting value before the superclass is setting it to nil
229
+ * Updating Selenium Manager binaries for 4.8.1 release
230
+
231
+ BiDi:
232
+ * Released selenium-devtools 0.110.0 (supports CDP v85, v108, v109, v110)
233
+ * Close BiDi session on closing the last top-level browsing context
234
+ * Add filtering capability to LogInspector
235
+
236
+ 4.8.0 (2023-01-23)
237
+ =========================
238
+ Ruby:
239
+ * Allow updating instance variables on service classes
240
+ * Deprecate extract_service_args processing in service classes
241
+ * Fix bug preventing sending nil to #send_keys with Remote Driver
242
+ * Fix bug with IE specific methods not available to IE Driver
243
+ * Created Chromium superclass for Chrome and Edge
244
+ * Deprecated platform and version setters/getters in Capabilities class
245
+ * Revamped driver constructor logic
246
+ * Fix bug preventing using Safari Technology Preview when using SafariOptions
247
+ * Fix bug preventing more than one driver type to access Selenium Manager
248
+ * Defaults to using Options instead of Capabilities
249
+ * Make Options classes more strict for allowed arguments and types
250
+ * Removed previously deprecated actions class parameters
251
+ * Removed Location struct
252
+ * Add comment with name of large JS executions (#11038)
253
+ * update logger with link on how to use it (#11478)
254
+ * Deprecate #add_option for Option classes in favor of constructor and attr_accessor
255
+ * Deprecate all unrecognized capabilities for Options classes
256
+ * Deprecate support for :capabilities for local drivers
257
+ * Deprecate browser class methods for Capabilities
258
+ * Deprecate #headless! for Chrome and Firefox
259
+
260
+ BiDi:
261
+ * Released selenium-devtools 0.109.0 (supports CDP v85, v107, v108, v109)
262
+ * Add LogInspector (#11368)
263
+ * Add Browsing context commands (#11446)
264
+
265
+ 4.7.1 (2022-12-02)
266
+ =========================
267
+ Ruby:
268
+ * Fix bug preventing selenium manager from using Internet Explorer
269
+
270
+ 4.7.0 (2022-12-01)
271
+ =========================
272
+ BiDi:
273
+ * Released selenium-devtools 0.108.0 (supports CDP v85, v106, v107, v108)
274
+ * Fix bug with socket stability
275
+
276
+ Ruby:
277
+ * Remove dependency on ChildProcess gem in favor of native Process.spawn (#11251)
278
+ * Add support for Selenium Manager to work with IE Driver
279
+ * Improve error handling for Selenium Manager
280
+
281
+ Safari:
282
+ * Fix bug preventing Safari Options from being used with Safari Technology Preview
283
+
284
+ 4.6.1 (2022-11-04)
285
+ =========================
286
+ Ruby:
287
+ * fix bug preventing selenium-manager from being executable by default
288
+
289
+ 4.6.0 (2022-11-04)
290
+ =========================
291
+ BiDi:
292
+ * Released selenium-devtools 0.107.0 (supports CDP v85, v105, v106, v107)
293
+
294
+ Ruby:
295
+ * firefox scroll by amount is only failing on mac
296
+ * add initial support for selenium manager
297
+ * Revert "[rb] do not allow Select class to work with disabled selects"
298
+ * Make sure selenium-manager is packed into gem
299
+ * Fix platform list in #scroll_by guard
300
+
301
+ 4.5.0 (2022-09-28)
302
+ =========================
303
+
304
+ BiDi:
305
+ * Released selenium-devtools 0.105.0 (supports CDP v85, v103, v104, v105)
306
+ * Released selenium-devtools 0.106.0 (supports CDP v85, v104, v105, v106)
307
+ * Add HasBiDi support to Chrome
308
+
309
+ Ruby:
310
+ * Fix bug in Platform code
311
+ * Update Select class to error when elements are disabled (#10812)
312
+
313
+ Firefox:
314
+ * Add support for installing unsigned add-ons (#10265, thanks TamsilAmani!)
315
+ * Change accept_insecure_certificates to true by default (to match other bindings)
316
+ * Set debugger_address option to true by default
317
+
318
+ Server:
319
+ * Add support for initializing server class with arguments and log level
320
+
321
+ 4.4.0 (2022-08-09)
322
+ =========================
323
+
324
+ BiDi:
325
+ * Released selenium-devtools 0.103.1 to fix websocket dependency requirement
326
+ * Released selenium-devtools 0.104.0 (supports CDP v85, v102, v103, v104)
327
+ * Have network interceptor ignore cancelled requests (#10856)
328
+ * Improve websocket message handling
329
+
330
+ Chromium:
331
+ * Prevent users from setting w3c: false and warn for true (thanks Tamsil Amani!)
332
+
333
+ Ruby:
334
+ * Implement Virtual Authenticator (#10903, #10541) (thanks Tamsil Amani!)
335
+
336
+ 4.3.0 (2022-06-23)
337
+ =========================
338
+
339
+ BiDi:
340
+ * Released selenium-devtools 0.103.0 (supports CDP v85, v101, v102, v103)
341
+
342
+ Ruby:
343
+ * Allow specifying which button is clicked in pointer action class methods
344
+ * Remove deprecated `Persistent` http class
345
+ * Remove deprecated HasRemoteStatus module
346
+ * Remove deprecated `Manager#new_window` and `Manager#logs`
347
+ * `ActionBuilder#move_to` no longer attempts to move to top left corner of element
348
+ * Remove deprecated support for sending Service parameters directly to Driver constructor
349
+ * Remove deprecated setters and getters for driver path on Browser modules
350
+ * Remove deprecated support for passing in options argument to Options class
351
+ * Allow `:options` parameter to take `Options` instance argument like other languages
352
+ * Remove deprecated support for `:desired_capabilities` & `:options` with `Hash` argument
353
+
354
+ 4.2.1 (2022-05-31)
355
+ =========================
356
+
357
+ Ruby
358
+ * Fix bug in setting default duration in Actions constructor
359
+
360
+ 4.2.0 (2022-05-27)
361
+ =========================
362
+
363
+ BiDi:
364
+ * Released selenium-devtools 0.97.0 (supports CDP v85, v95, v96, v97)
365
+ * Released selenium-devtools 0.98.0 (supports CDP v85, v96, v97, v98)
366
+ * Released selenium-devtools 0.99.0 (supports CDP v85, v97, v98, v99)
367
+ * Released selenium-devtools 0.100.0 (supports CDP v85, v98, v99, v100)
368
+ * Released selenium-devtools 0.101.0 (supports CDP v85, v99, v100, v101)
369
+ * Released selenium-devtools 0.102.0 (supports CDP v85, v100, v101, v102)
370
+ * Implement simple BiDi connection
371
+ * Fix bug in initial BiDi implementation (thanks Boris Petrov!)
372
+ * Fix bug with mutating headers in request interception (#10574)
373
+ * Fix bug with empty response headers (thanks Viren Negi!)
374
+
375
+ Firefox:
376
+ * Add support to Firefox Options for environment capability
377
+ * Use addon parameter instead of path parameter to avoid using file detector
378
+ * Restore #from_name method to Firefox profile (#10146)
379
+
380
+ Chromium:
381
+ * Add support for casting desktop
382
+
383
+ Ruby:
384
+ * Updated minimum required Ruby version to 2.7
385
+ * Fix bug by not attempting to stop service process when it's not started (#10015)
386
+ * Fix bug to not stop service process when it's not started (thanks Atsushi Tatsuma!)
387
+ * Use driver endpoint to get page source instead of JavaScript
388
+ * Add zenkaku_hankaku key support
389
+ * Fix download support of Selenium Server
390
+ * Do not convert Tag Name to CSS Selector
391
+
392
+ ActionBuilder:
393
+ * Raise error if input device not found
394
+ * Move `TypingInteraction` from `Interactions::KeyInput` to `Interactions` module
395
+ * Throw better errors for `PointerInput` methods
396
+ * Allow each action interaction class to validate its own source
397
+ * Set all Interactions classes to private
398
+ * Allow device names to use a default id if one is not specified
399
+ * Deprecate default mouse and keyboard values in constructor, favoring devices parameter
400
+ * Add support for pointer event properties
401
+ * Implement scroll wheel support
402
+ * Deprecate ordered pair parameters for pause method in favor of keywords
403
+ * Deprecate move to element with offset changing origin to top left of element
404
+
405
+ 4.1.0 (2021-11-22)
2
406
  =========================
3
407
 
4
408
  DevTools:
data/Gemfile CHANGED
@@ -4,3 +4,6 @@ source 'https://rubygems.org'
4
4
  Dir["#{__dir__}/*.gemspec"].each do |spec|
5
5
  gemspec name: File.basename(spec, '.gemspec')
6
6
  end
7
+
8
+ gem 'debug', '~> 1.7', require: false, platforms: %i[mri mingw x64_mingw]
9
+ gem 'steep', '~> 1.5.0', require: false, platforms: %i[mri mingw x64_mingw]
data/LICENSE CHANGED
@@ -187,7 +187,7 @@
187
187
  same "printed page" as the copyright notice for easier
188
188
  identification within third-party archives.
189
189
 
190
- Copyright 2021 Software Freedom Conservancy (SFC)
190
+ Copyright 2024 Software Freedom Conservancy (SFC)
191
191
 
192
192
  Licensed under the Apache License, Version 2.0 (the "License");
193
193
  you may not use this file except in compliance with the License.
data/NOTICE CHANGED
@@ -1,2 +1,2 @@
1
- Copyright 2011-2021 Software Freedom Conservancy
1
+ Copyright 2011-2024 Software Freedom Conservancy
2
2
  Copyright 2004-2011 Selenium committers
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # selenium-webdriver
2
2
 
3
- This gem provides Ruby bindings for Selenium and supports MRI >= 2.6
3
+ This gem provides Ruby bindings for Selenium and supports MRI >= 3.0.
4
4
 
5
5
  ## Install
6
6
 
@@ -10,12 +10,12 @@ This gem provides Ruby bindings for Selenium and supports MRI >= 2.6
10
10
 
11
11
  * https://rubygems.org/gems/selenium-webdriver
12
12
  * https://www.selenium.dev/selenium/docs/api/rb/index.html
13
- * https://github.com/SeleniumHQ/selenium/wiki/Ruby-Bindings
13
+ * https://www.selenium.dev/documentation/?tab=ruby
14
14
  * https://github.com/SeleniumHQ/selenium/issues
15
15
 
16
16
  ## License
17
17
 
18
- Copyright 2009-2021 Software Freedom Conservancy
18
+ Copyright 2009-2024 Software Freedom Conservancy
19
19
 
20
20
  Licensed to the Software Freedom Conservancy (SFC) under one
21
21
  or more contributor license agreements. See the NOTICE file
Binary file
Binary file
Binary file
@@ -17,7 +17,8 @@
17
17
  # specific language governing permissions and limitations
18
18
  # under the License.
19
19
 
20
- require 'childprocess'
20
+ require 'selenium/webdriver/common/child_process'
21
+ require 'selenium/webdriver/common/port_prober'
21
22
  require 'selenium/webdriver/common/socket_poller'
22
23
  require 'net/http'
23
24
 
@@ -84,15 +85,15 @@ module Selenium
84
85
  return download_file_name if File.exist? download_file_name
85
86
 
86
87
  begin
87
- server = 'https://github.com/seleniumhq/selenium/releases/download'
88
- released = Net::HTTP.get_response(URI.parse("#{server}/selenium-#{required_version}/#{download_file_name}"))
88
+ download_location = available_assets[download_file_name]['browser_download_url']
89
+ released = Net::HTTP.get_response(URI.parse(download_location))
89
90
  redirected = URI.parse released.header['location']
90
91
 
91
92
  File.open(download_file_name, 'wb') do |destination|
92
93
  download_server(redirected, destination)
93
94
  end
94
95
  rescue StandardError
95
- FileUtils.rm download_file_name if File.exist? download_file_name
96
+ FileUtils.rm_rf download_file_name
96
97
  raise
97
98
  end
98
99
 
@@ -105,19 +106,24 @@ module Selenium
105
106
 
106
107
  def latest
107
108
  @latest ||= begin
108
- net_http_start('api.github.com') do |http|
109
- json = http.get('/repos/seleniumhq/selenium/releases').body
110
- all_assets = JSON.parse(json).map { |release| release['assets'] }.flatten
111
- server_assets = all_assets.map { |asset| asset['name'][/selenium-server-(\d+\.\d+\.\d+)\.jar/, 1] }.compact
112
- server_assets.map { |version| Gem::Version.new(version) }.max.version
113
- end
109
+ available = available_assets.keys.map { |key| key[/selenium-server-(\d+\.\d+\.\d+)\.jar/, 1] }
110
+ available.map { |asset| Gem::Version.new(asset) }.max.to_s
114
111
  end
115
112
  end
116
113
 
117
114
  # @api private
118
115
 
116
+ def available_assets
117
+ @available_assets ||= net_http_start('api.github.com') do |http|
118
+ json = http.get('/repos/seleniumhq/selenium/releases').body
119
+ all_assets = JSON.parse(json).map { |release| release['assets'] }.flatten
120
+ server_assets = all_assets.select { |asset| asset['name'].match(/selenium-server-(\d+\.\d+\.\d+)\.jar/) }
121
+ server_assets.each_with_object({}) { |asset, hash| hash[asset.delete('name')] = asset }
122
+ end
123
+ end
124
+
119
125
  def net_http_start(address, &block)
120
- http_proxy = ENV['http_proxy'] || ENV['HTTP_PROXY']
126
+ http_proxy = ENV.fetch('http_proxy', nil) || ENV.fetch('HTTP_PROXY', nil)
121
127
  if http_proxy
122
128
  http_proxy = "http://#{http_proxy}" unless http_proxy.start_with?('http://')
123
129
  uri = URI.parse(http_proxy)
@@ -160,7 +166,7 @@ module Selenium
160
166
  # :standalone, #hub, #node
161
167
  #
162
168
 
163
- attr_accessor :role, :port, :timeout, :background, :log
169
+ attr_accessor :role, :host, :port, :timeout, :background, :log
164
170
 
165
171
  #
166
172
  # @param [String] jar Path to the server jar.
@@ -177,15 +183,22 @@ module Selenium
177
183
  def initialize(jar, opts = {})
178
184
  raise Errno::ENOENT, jar unless File.exist?(jar)
179
185
 
180
- @jar = jar
181
- @host = '127.0.0.1'
182
- @role = opts.fetch(:role, 'standalone')
183
- @port = opts.fetch(:port, 4444)
184
- @timeout = opts.fetch(:timeout, 30)
186
+ @java = opts.fetch(:java, 'java')
187
+ @jar = jar
188
+ @host = '127.0.0.1'
189
+ @role = opts.fetch(:role, 'standalone')
190
+ @port = opts.fetch(:port, WebDriver::PortProber.above(4444))
191
+ @timeout = opts.fetch(:timeout, 30)
185
192
  @background = opts.fetch(:background, false)
186
- @log = opts[:log]
187
- @log_file = nil
188
- @additional_args = []
193
+ @additional_args = opts.fetch(:args, [])
194
+ @log = opts[:log]
195
+ if opts[:log_level]
196
+ @log ||= true
197
+ @additional_args << '--log-level'
198
+ @additional_args << opts[:log_level].to_s
199
+ end
200
+
201
+ @log_file = nil
189
202
  end
190
203
 
191
204
  def start
@@ -196,11 +209,6 @@ module Selenium
196
209
  end
197
210
 
198
211
  def stop
199
- begin
200
- Net::HTTP.get(@host, '/selenium-server/driver/?cmd=shutDownSeleniumServer', @port)
201
- rescue Errno::ECONNREFUSED
202
- end
203
-
204
212
  stop_process if @process
205
213
  poll_for_shutdown
206
214
 
@@ -222,13 +230,7 @@ module Selenium
222
230
  private
223
231
 
224
232
  def stop_process
225
- return unless @process.alive?
226
-
227
- begin
228
- @process.poll_for_exit(5)
229
- rescue ChildProcess::TimeoutError
230
- @process.stop
231
- end
233
+ @process.stop
232
234
  rescue Errno::ECHILD
233
235
  # already dead
234
236
  ensure
@@ -240,17 +242,13 @@ module Selenium
240
242
  # extract any additional_args that start with -D as options
241
243
  properties = @additional_args.dup - @additional_args.delete_if { |arg| arg[/^-D/] }
242
244
  args = ['-jar', @jar, @role, '--port', @port.to_s]
243
- server_command = ['java'] + properties + args + @additional_args
244
- cp = ChildProcess.build(*server_command)
245
- WebDriver.logger.debug("Executing Process #{server_command}")
246
-
247
- io = cp.io
245
+ server_command = [@java] + properties + args + @additional_args
246
+ cp = WebDriver::ChildProcess.build(*server_command)
248
247
 
249
248
  if @log.is_a?(String)
250
- @log_file = File.open(@log, 'w')
251
- io.stdout = io.stderr = @log_file
249
+ cp.io = @log
252
250
  elsif @log
253
- io.inherit!
251
+ cp.io = :out
254
252
  end
255
253
 
256
254
  cp.detach = @background