selenium-webdriver 3.142.7 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGES +324 -5
- data/Gemfile +3 -1
- data/LICENSE +1 -1
- data/NOTICE +2 -0
- data/README.md +4 -5
- data/lib/selenium/server.rb +21 -29
- data/lib/selenium/webdriver/atoms/findElements.js +122 -0
- data/lib/selenium/webdriver/atoms/getAttribute.js +100 -7
- data/lib/selenium/webdriver/atoms/isDisplayed.js +76 -78
- data/lib/selenium/webdriver/atoms/mutationListener.js +55 -0
- data/lib/selenium/webdriver/chrome/driver.rb +26 -83
- data/lib/selenium/webdriver/chrome/{bridge.rb → features.rb} +50 -12
- data/lib/selenium/webdriver/chrome/options.rb +129 -58
- data/lib/selenium/webdriver/chrome/profile.rb +6 -3
- data/lib/selenium/webdriver/chrome/service.rb +8 -15
- data/lib/selenium/webdriver/chrome.rb +10 -9
- data/lib/selenium/webdriver/common/action_builder.rb +97 -249
- data/lib/selenium/webdriver/common/driver.rb +112 -23
- data/lib/selenium/webdriver/common/driver_extensions/full_page_screenshot.rb +43 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_apple_permissions.rb +51 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_authentication.rb +89 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_casting.rb +77 -0
- data/lib/selenium/webdriver/common/driver_extensions/{has_touch_screen.rb → has_cdp.rb} +10 -8
- data/lib/selenium/webdriver/common/driver_extensions/has_context.rb +45 -0
- data/lib/selenium/webdriver/{firefox/util.rb → common/driver_extensions/has_devtools.rb} +16 -19
- data/lib/selenium/webdriver/common/driver_extensions/has_launching.rb +38 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_location.rb +5 -8
- data/lib/selenium/webdriver/common/driver_extensions/has_log_events.rb +144 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_logs.rb +30 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_network_conditions.rb +17 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_network_connection.rb +6 -27
- data/lib/selenium/webdriver/common/driver_extensions/has_network_interception.rb +136 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_permissions.rb +11 -11
- data/lib/selenium/webdriver/common/driver_extensions/has_pinned_scripts.rb +77 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_remote_status.rb +1 -0
- data/lib/selenium/webdriver/common/driver_extensions/{rotatable.rb → prints_page.rb} +18 -20
- data/lib/selenium/webdriver/common/element.rb +82 -22
- data/lib/selenium/webdriver/common/error.rb +32 -196
- data/lib/selenium/webdriver/common/interactions/interaction.rb +4 -1
- data/lib/selenium/webdriver/common/interactions/key_actions.rb +5 -5
- data/lib/selenium/webdriver/common/interactions/pointer_actions.rb +13 -13
- data/lib/selenium/webdriver/common/log_entry.rb +2 -2
- data/lib/selenium/webdriver/common/logger.rb +50 -15
- data/lib/selenium/webdriver/common/manager.rb +15 -15
- data/lib/selenium/webdriver/common/options.rb +156 -23
- data/lib/selenium/webdriver/common/platform.rb +6 -1
- data/lib/selenium/webdriver/common/port_prober.rb +4 -6
- data/lib/selenium/webdriver/common/profile_helper.rb +10 -2
- data/lib/selenium/webdriver/common/proxy.rb +6 -3
- data/lib/selenium/webdriver/common/search_context.rb +7 -3
- data/lib/selenium/webdriver/common/service.rb +17 -125
- data/lib/selenium/webdriver/common/service_manager.rb +151 -0
- data/lib/selenium/webdriver/common/shadow_root.rb +87 -0
- data/lib/selenium/webdriver/common/socket_lock.rb +2 -2
- data/lib/selenium/webdriver/common/socket_poller.rb +2 -2
- data/lib/selenium/webdriver/common/takes_screenshot.rb +66 -0
- data/lib/selenium/webdriver/common/target_locator.rb +32 -4
- data/lib/selenium/webdriver/common/timeouts.rb +31 -4
- data/lib/selenium/webdriver/common/wait.rb +1 -1
- data/lib/selenium/webdriver/common/window.rb +0 -4
- data/lib/selenium/webdriver/common.rb +23 -17
- data/lib/selenium/webdriver/devtools/console_event.rb +38 -0
- data/lib/selenium/webdriver/devtools/exception_event.rb +36 -0
- data/lib/selenium/webdriver/devtools/mutation_event.rb +37 -0
- data/lib/selenium/webdriver/devtools/pinned_script.rb +59 -0
- data/lib/selenium/webdriver/devtools/request.rb +67 -0
- data/lib/selenium/webdriver/devtools/response.rb +66 -0
- data/lib/selenium/webdriver/devtools.rb +182 -0
- data/lib/selenium/webdriver/edge/driver.rb +7 -29
- data/lib/selenium/webdriver/edge/features.rb +44 -0
- data/lib/selenium/webdriver/edge/options.rb +11 -48
- data/lib/selenium/webdriver/{common/w3c_manager.rb → edge/profile.rb} +7 -19
- data/lib/selenium/webdriver/edge/service.rb +10 -26
- data/lib/selenium/webdriver/edge.rb +11 -14
- data/lib/selenium/webdriver/firefox/driver.rb +31 -19
- data/lib/selenium/webdriver/firefox/extension.rb +8 -0
- data/lib/selenium/webdriver/firefox/features.rb +66 -0
- data/lib/selenium/webdriver/firefox/options.rb +70 -49
- data/lib/selenium/webdriver/firefox/profile.rb +21 -71
- data/lib/selenium/webdriver/firefox/service.rb +5 -9
- data/lib/selenium/webdriver/firefox.rb +22 -20
- data/lib/selenium/webdriver/ie/driver.rb +1 -47
- data/lib/selenium/webdriver/ie/options.rb +13 -44
- data/lib/selenium/webdriver/ie/service.rb +13 -15
- data/lib/selenium/webdriver/ie.rb +8 -7
- data/lib/selenium/webdriver/remote/bridge.rb +558 -86
- data/lib/selenium/webdriver/remote/capabilities.rb +159 -123
- data/lib/selenium/webdriver/remote/commands.rb +163 -0
- data/lib/selenium/webdriver/remote/driver.rb +22 -12
- data/lib/selenium/webdriver/remote/http/common.rb +0 -5
- data/lib/selenium/webdriver/remote/http/default.rb +17 -20
- data/lib/selenium/webdriver/remote/http/persistent.rb +11 -6
- data/lib/selenium/webdriver/remote/response.rb +16 -47
- data/lib/selenium/webdriver/remote.rb +15 -13
- data/lib/selenium/webdriver/safari/driver.rb +3 -31
- data/lib/selenium/webdriver/safari/{bridge.rb → features.rb} +3 -3
- data/lib/selenium/webdriver/safari/options.rb +10 -29
- data/lib/selenium/webdriver/safari/service.rb +4 -8
- data/lib/selenium/webdriver/safari.rb +17 -9
- data/lib/selenium/webdriver/support/block_event_listener.rb +1 -1
- data/lib/selenium/webdriver/support/cdp/domain.rb.erb +63 -0
- data/lib/selenium/webdriver/support/cdp_client_generator.rb +108 -0
- data/lib/selenium/webdriver/support/color.rb +2 -2
- data/lib/selenium/webdriver/support/event_firing_bridge.rb +4 -4
- data/lib/selenium/webdriver/support/guards/guard.rb +89 -0
- data/lib/selenium/webdriver/{firefox/marionette/bridge.rb → support/guards/guard_condition.rb} +22 -19
- data/lib/selenium/webdriver/support/guards.rb +95 -0
- data/lib/selenium/webdriver/support/relative_locator.rb +51 -0
- data/lib/selenium/webdriver/support/select.rb +3 -3
- data/lib/selenium/webdriver/support.rb +1 -0
- data/lib/selenium/webdriver/version.rb +1 -1
- data/lib/selenium/webdriver.rb +12 -12
- data/selenium-webdriver.gemspec +28 -12
- metadata +128 -69
- data/lib/selenium/webdriver/common/bridge_helper.rb +0 -82
- data/lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb +0 -64
- data/lib/selenium/webdriver/common/keyboard.rb +0 -70
- data/lib/selenium/webdriver/common/mouse.rb +0 -89
- data/lib/selenium/webdriver/common/touch_action_builder.rb +0 -78
- data/lib/selenium/webdriver/common/touch_screen.rb +0 -123
- data/lib/selenium/webdriver/common/w3c_action_builder.rb +0 -212
- data/lib/selenium/webdriver/edge/bridge.rb +0 -76
- data/lib/selenium/webdriver/firefox/binary.rb +0 -187
- data/lib/selenium/webdriver/firefox/extension/prefs.json +0 -69
- data/lib/selenium/webdriver/firefox/extension/webdriver.xpi +0 -0
- data/lib/selenium/webdriver/firefox/launcher.rb +0 -111
- data/lib/selenium/webdriver/firefox/legacy/driver.rb +0 -83
- data/lib/selenium/webdriver/firefox/marionette/driver.rb +0 -90
- data/lib/selenium/webdriver/firefox/native/linux/amd64/x_ignore_nofocus.so +0 -0
- data/lib/selenium/webdriver/firefox/native/linux/x86/x_ignore_nofocus.so +0 -0
- data/lib/selenium/webdriver/remote/oss/bridge.rb +0 -594
- data/lib/selenium/webdriver/remote/oss/commands.rb +0 -223
- data/lib/selenium/webdriver/remote/w3c/bridge.rb +0 -605
- data/lib/selenium/webdriver/remote/w3c/capabilities.rb +0 -310
- data/lib/selenium/webdriver/remote/w3c/commands.rb +0 -157
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c06a2d4e78b10cc31c89baf7ac72014ca43bf4425b0825ede55d942ef90ae47a
|
4
|
+
data.tar.gz: f3d005b5469d38ab07c6a35a032c65b69f97c54ecbd648bbaf5217f43e1a9457
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dba83257a6a44f2a68fdea7f7c7ae30b2d27802407d22b42bd4262b3ba8a71be00b90de4a1850428a208392ce6ecc63db20b30af8b2b14d910d5a7c20be9c32e
|
7
|
+
data.tar.gz: f9bf4b3098e9e9b5487c766e33ccdebda51f4854f3aaf896af12b26875644ab691530700af80d84fc15b73369e27742568aba375800975da9c81fc8e46beeb9d
|
data/CHANGES
CHANGED
@@ -1,3 +1,323 @@
|
|
1
|
+
4.0.0 (2021-10-13)
|
2
|
+
=========================
|
3
|
+
|
4
|
+
Ruby:
|
5
|
+
* Updated minimum required Ruby version to 2.6
|
6
|
+
* Updated minimum required rexml gem version due to vulnerability
|
7
|
+
|
8
|
+
Chrome:
|
9
|
+
* Added default values for Network Conditions so no longer need to specify everything
|
10
|
+
|
11
|
+
Firefox:
|
12
|
+
* Fixed bug where Firefox prefs were converting snake case to camel case
|
13
|
+
|
14
|
+
4.0.0.rc3 (2021-10-08)
|
15
|
+
=========================
|
16
|
+
|
17
|
+
Ruby:
|
18
|
+
* Added support for getting timeout values from the driver
|
19
|
+
|
20
|
+
4.0.0.rc2 (2021-09-30)
|
21
|
+
=========================
|
22
|
+
|
23
|
+
DevTools:
|
24
|
+
* Released selenium-devtools 0.93.0 (2021-09-01)
|
25
|
+
- adds CDP version 93
|
26
|
+
- removes CDP version 91
|
27
|
+
* Released selenium-devtools 0.94.0 (2021-09-22)
|
28
|
+
- adds CDP version 94
|
29
|
+
- removes CDP version 92
|
30
|
+
* Added support for mutating responses in network interception
|
31
|
+
|
32
|
+
Ruby:
|
33
|
+
* Implemented Options#add_option to work for vendor extension capabilities
|
34
|
+
* Fixed bug for requiring uri (#9825 thanks @flanger001)
|
35
|
+
* Moved New Window functionality to TargetLocator#new_window to be used with Driver#switch_to
|
36
|
+
* Deprecated using Manager#new_window
|
37
|
+
* Changed order of logging output (#9850)
|
38
|
+
* Added support for web_socket_url capability
|
39
|
+
|
40
|
+
Chromium:
|
41
|
+
* Implemented casting functionality
|
42
|
+
* Implemented ability to launch chromium app
|
43
|
+
* Implemented support for specifying permissions
|
44
|
+
* Added support for Chrome-specific Android functionality with #enable_android
|
45
|
+
|
46
|
+
Firefox:
|
47
|
+
* Implemented context functionality
|
48
|
+
* Added support for Firefox-specific Android functionality with #enable_android
|
49
|
+
|
50
|
+
Remote:
|
51
|
+
* Added support for file detector to install Firefox addons from client machine
|
52
|
+
|
53
|
+
4.0.0.rc1 (2021-09-01)
|
54
|
+
=========================
|
55
|
+
|
56
|
+
DevTools:
|
57
|
+
* Released selenium-devtools 0.92.0 (2021-08-21) which:
|
58
|
+
- adds CDP versions 92
|
59
|
+
- removes CDP versions 88, 89, 90
|
60
|
+
|
61
|
+
IE:
|
62
|
+
* Added options for running Microsoft Edge in IE mode with IE Driver
|
63
|
+
|
64
|
+
Remote:
|
65
|
+
* Added default file detector for remote driver
|
66
|
+
|
67
|
+
Ruby:
|
68
|
+
* Fixed bug for getting valid capability that has not been set
|
69
|
+
* Fixed bug preventing loading of ServerError class
|
70
|
+
|
71
|
+
4.0.0.beta4 (2021-06-07)
|
72
|
+
=========================
|
73
|
+
|
74
|
+
Chrome:
|
75
|
+
* Fixed bug with camel casing of localState object
|
76
|
+
|
77
|
+
Firefox:
|
78
|
+
* Added support for Full Page Screenshots
|
79
|
+
|
80
|
+
Remote:
|
81
|
+
* Added support for #execute_cdp on Chrome and Edge
|
82
|
+
|
83
|
+
Ruby:
|
84
|
+
* Changed capabilities to use alwaysMatch instead of firstMatch by default
|
85
|
+
* Fixed bug preventing Options classes from handling Proxy instances
|
86
|
+
|
87
|
+
4.0.0.beta3 (2021-04-13)
|
88
|
+
=========================
|
89
|
+
|
90
|
+
Chrome:
|
91
|
+
* Fixed a regression with prefs hash keys being converted to camelCase.
|
92
|
+
* Fixed an issue when passing Profile object to Options would fail.
|
93
|
+
|
94
|
+
DevTools:
|
95
|
+
* Released selenium-devtools 0.91.0 which:
|
96
|
+
- adds CDP versions 90 and 91
|
97
|
+
- removes CDP versions 86 and 87
|
98
|
+
|
99
|
+
Remote:
|
100
|
+
* Added support for setting alwaysMatch/firstMatch capabilities per W3C
|
101
|
+
WebDriver specification. It's done using the following methods where
|
102
|
+
`caps` is either a Ruby hash with desired capabilities or an instance
|
103
|
+
of Remote::Capabilities:
|
104
|
+
* Selenium::WebDriver::Remote::Capabilities.always_match(caps)
|
105
|
+
* Selenium::WebDriver::Remote::Capabilities.first_match(caps)
|
106
|
+
* Added support for Driver#save_print_page.
|
107
|
+
* Fixed an issue with Driver#print_page.
|
108
|
+
* Added support for setting timeouts capabilities in Remote::Capabilities
|
109
|
+
per W3C WebDriver specification.
|
110
|
+
* Added support for Element#aria_role which returns WAI-ARIA role of the element.
|
111
|
+
* Added support for Element#accessible name which returns WAI-ARIA label of the element.
|
112
|
+
* Added support for using DevTools version provided by Grid instead of
|
113
|
+
calculating it manually
|
114
|
+
|
115
|
+
Ruby:
|
116
|
+
* Remove JRuby-specific socket poller. Note that this requires JRuby 9.2.8.0+.
|
117
|
+
|
118
|
+
4.0.0.beta2 (2021-03-16)
|
119
|
+
=========================
|
120
|
+
|
121
|
+
DevTools:
|
122
|
+
* Separated out DevTools methods into selenium-devtools gem to better manage versioning
|
123
|
+
* Updated supported versions to 85-89
|
124
|
+
* Add support for intercepting browser requests
|
125
|
+
|
126
|
+
Firefox:
|
127
|
+
* Add support for using DevTools commands with Firefox Nightly
|
128
|
+
|
129
|
+
Remote:
|
130
|
+
* Provide access to browser specific driver extensions as appropriate for designated browser
|
131
|
+
* Add support for using DevTools commands via Grid
|
132
|
+
|
133
|
+
Ruby:
|
134
|
+
* Spec Guard implementation moved into lib directory for other projects to use
|
135
|
+
* Implemented `Element#dom_attribute` to obtain attribute value as defined by w3c specification
|
136
|
+
* Implemented `Options#eq?`
|
137
|
+
* Allow Options subclass instances to be created from class methods in superclass
|
138
|
+
|
139
|
+
Safari:
|
140
|
+
* Fix bug that prevented usage of Safari Technology Preview
|
141
|
+
|
142
|
+
4.0.0.beta1 (2021-02-15)
|
143
|
+
=========================
|
144
|
+
|
145
|
+
DevTools:
|
146
|
+
* Updated supported versions to 85-88
|
147
|
+
|
148
|
+
Edge:
|
149
|
+
* Removed support for legacy Edge HTML
|
150
|
+
|
151
|
+
Firefox:
|
152
|
+
* Fixed support for default profile settings
|
153
|
+
* Added support for Devtools for Firefox v87+
|
154
|
+
|
155
|
+
Safari:
|
156
|
+
* Removed default platformName specification so it works with Grid
|
157
|
+
|
158
|
+
Ruby:
|
159
|
+
* Added support for httpOnly attribute in Cookies
|
160
|
+
* Implemented `#print_page` method (thanks @raju249)
|
161
|
+
* Fixed support for missing libraries in Ruby 3.0 (thanks @znz)
|
162
|
+
* Deprecated `HTTP::Persistent` class
|
163
|
+
* Fixed support for accessors in options classes
|
164
|
+
* Added support for status endpoint for all browsers
|
165
|
+
* Fix support for Browser, Driver, and Performance Logging in Chrome and Edge
|
166
|
+
|
167
|
+
4.0.0.alpha7 (2020-11-10)
|
168
|
+
=========================
|
169
|
+
|
170
|
+
Chrome:
|
171
|
+
* Fixed a link to download ChromeDriver when it's not found (thanks @masakazutakewaka).
|
172
|
+
* Fixed an issue when passing instance of Profile to an Options in capabilities
|
173
|
+
(thanks @masakazutakewaka).
|
174
|
+
|
175
|
+
DevTools:
|
176
|
+
* Added support for multiple version of CDP. Currently supported versions are
|
177
|
+
84-87. The proper version is automatically selected when the browser is started
|
178
|
+
based on its version. The implementation is Chromium-based and is confirmed
|
179
|
+
to work in Chrome and Edge at least.
|
180
|
+
* Added support for basic authentication (see HasAuthentication).
|
181
|
+
* Added support for listening to JavaScript console messages (see HasLogEvents).
|
182
|
+
* Added support for listening to JavaScript exceptions (see HasLogEvents).
|
183
|
+
* Added support for listening to DOM mutations (see HasLogEvents).
|
184
|
+
|
185
|
+
Edge:
|
186
|
+
* Switched default Edge implementation to Chromium-based. To use older versions
|
187
|
+
of Edge, pass :edge_html when initializing the driver.
|
188
|
+
|
189
|
+
Firefox:
|
190
|
+
* Fixed an issue whereby using the new capabilities structure in local drivers
|
191
|
+
would cause the W3C check to complain that `browser_name` was an invalid
|
192
|
+
capability key name (thanks @luke-hill)
|
193
|
+
|
194
|
+
Ruby:
|
195
|
+
* Added support for taking screenshots of individual elements using Element#screenshot
|
196
|
+
(thanks @johndouthat).
|
197
|
+
* Fixed deprecation message of using Net::HTTP::Proxy (thanks @masakazutakewaka).
|
198
|
+
* Fixed false negative detection of Linux on WSL2 (thanks @snsten).
|
199
|
+
* Support ChildProcess 4.x versions (thanks @boutil).
|
200
|
+
|
201
|
+
Safari:
|
202
|
+
* Fixed browser name in capabilities for Safari Technology Preview.
|
203
|
+
|
204
|
+
4.0.0.alpha6 (2020-05-28)
|
205
|
+
=========================
|
206
|
+
|
207
|
+
Chrome:
|
208
|
+
* Added DevTools classes and methods generated from the CDP specification.
|
209
|
+
It currently supports commands and events and provides Rubyish API:
|
210
|
+
driver.devtools.page.navigate(url: 'http://google.com')
|
211
|
+
driver.devtools.console.clear_messages
|
212
|
+
driver.devtools.page.enable
|
213
|
+
driver.devtools.page.on(:load_event_fired) do |params|
|
214
|
+
puts("Page loaded in #{params['timestamp']}")
|
215
|
+
end
|
216
|
+
Check https://chromedevtools.github.io/devtools-protocol/ for more information
|
217
|
+
about possible commands and events. Please note that this API is considered
|
218
|
+
to be experimental and may change any time before stable 4.0 release.
|
219
|
+
* Fixed an issue when passing :prompt_for_download (or similar snake_cased
|
220
|
+
symbols) in Options#prefs would be ignored by Chrome because Selenium
|
221
|
+
would internally convert it to camelCased format (:promptForDownload).
|
222
|
+
Now :prefs are left intact.
|
223
|
+
|
224
|
+
Edge:
|
225
|
+
* Fixed an issue when Driver#execute_cdp would not work for Chromium-based
|
226
|
+
Edge browser.
|
227
|
+
|
228
|
+
Ruby:
|
229
|
+
* Deprecated passing :desired_capabilities and :options to driver initialization
|
230
|
+
in favor of :capabilities. They now can be combined in an array to make
|
231
|
+
custom capabilities requirements:
|
232
|
+
caps = Selenium::WebDriver::Remote::Capabilities.chrome
|
233
|
+
opts = Selenium::WebDriver::Chrome::Options.new
|
234
|
+
Selenium::WebDriver.for(:remote, capabilities: :chrome)
|
235
|
+
Selenium::WebDriver.for(:remote, capabilities: caps)
|
236
|
+
Selenium::WebDriver.for(:remote, capabilities: opts)
|
237
|
+
Selenium::WebDriver.for(:remote, capabilities: [caps, opts])
|
238
|
+
* Deprecated passing Hash to :capabilities in favor of Remote::Capabilities object.
|
239
|
+
* Updated minimum require Ruby version to 2.5.
|
240
|
+
* Improved keyword arguments handling to avoid warnings in Ruby 2.7.
|
241
|
+
|
242
|
+
4.0.0.alpha5 (2020-03-18)
|
243
|
+
=========================
|
244
|
+
|
245
|
+
The release is just to synchronize version with other bindings and does not
|
246
|
+
include any changes.
|
247
|
+
|
248
|
+
4.0.0.alpha4 (2020-01-09)
|
249
|
+
=========================
|
250
|
+
|
251
|
+
Ruby:
|
252
|
+
* Added initial support for relative locators, which allow to find elements
|
253
|
+
above/below/left/right/near another element. For example, you can find all
|
254
|
+
the cells in a table to the right of your starting cell:
|
255
|
+
start_cell = driver.find_element(css: 'td')
|
256
|
+
right_cells = driver.find_elements(relative: {tag_name: 'td', right: start_cell})
|
257
|
+
The documentation is still lacking so refer to examples in df6be2e962.
|
258
|
+
* Added ability to silence certain logger messages by using it's identifiers:
|
259
|
+
Selenium::WebDriver.logger.ignore(:driver_path)
|
260
|
+
* Added new dependency: websocket. It's used for communicating with Chrome DevTools.
|
261
|
+
* Loosened childprocess dependency to allow using version 2.0+.
|
262
|
+
* Loosened rubyzip dependency to allow using version 2.0+.
|
263
|
+
* Fixed Errno::EACCES error on Linux DeX and similar distributes
|
264
|
+
|
265
|
+
Chrome:
|
266
|
+
* Added initial support for communicating with Chrome DevTools. The implementation
|
267
|
+
is very basic and lacks CDP domains, events and types - those will be added
|
268
|
+
in future releases. Still, it allows to execute simple commands to DevTools:
|
269
|
+
driver.devtools.send('Page.navigate', {url: 'https://google.com'})
|
270
|
+
|
271
|
+
4.0.0.alpha3 (2019-07-08)
|
272
|
+
=========================
|
273
|
+
|
274
|
+
Ruby:
|
275
|
+
* All documented driver capabilities supported in respective browser Options class by constructor and accessor
|
276
|
+
* Driver constructor :options and :desired_capabilities generate the same capabilities for local and remote execution
|
277
|
+
* Deprecated :options as keyword for initializing browser Options classes
|
278
|
+
|
279
|
+
Chrome:
|
280
|
+
* Add support for browser logging with latest versions of chromedriver
|
281
|
+
|
282
|
+
Edge:
|
283
|
+
* Add support for Chromium based implementation
|
284
|
+
|
285
|
+
4.0.0.alpha2 (2019-05-02)
|
286
|
+
=========================
|
287
|
+
|
288
|
+
Ruby:
|
289
|
+
* Fixed an issue with previous alpha release which lead to removed files
|
290
|
+
being packaged inside the gem
|
291
|
+
|
292
|
+
4.0.0.alpha1 (2019-05-01)
|
293
|
+
=========================
|
294
|
+
|
295
|
+
Ruby:
|
296
|
+
* Removed Mouse and Keyboard as their implementations are not compliant to WebDriver specification
|
297
|
+
* Removed TouchActionBuilder as its implementation is not compliant to WebDriver specification
|
298
|
+
* Change ActionBuilder to be fully compliant to WebDriver specification
|
299
|
+
* Change Manager to be fully compliant to WebDriver specification
|
300
|
+
* Removed all deprecated errors that are not compliant to WebDriver specification
|
301
|
+
* Update minimum required Ruby version to 2.4
|
302
|
+
* Changed capabilities to use only those that are compliant to WebDriver specification
|
303
|
+
* Removed deprecated timeout setter on default HTTP client
|
304
|
+
* Removed deprecated Remote::W3C::Capabilities
|
305
|
+
* Fixed an issue when services are not shutdown properly
|
306
|
+
|
307
|
+
Chrome:
|
308
|
+
* Removed support for OSS mode - use W3C mode instead by using
|
309
|
+
Selenium::WebDriver::Chrome::Options.new(options: {w3c: true})
|
310
|
+
|
311
|
+
PhantomJS:
|
312
|
+
* Removed support for PhantomJS driver
|
313
|
+
|
314
|
+
Firefox:
|
315
|
+
* Removed support for legacy Firefox driver - use GeckoDriver instead
|
316
|
+
* Removed deprecated outdated capabilities
|
317
|
+
* Fixed an issue when passing :profile string to Firefox::Options.new would
|
318
|
+
result in NoMethodError. Now it will find a profile with such name on your
|
319
|
+
system and use it accordingly (issue #7119)
|
320
|
+
|
1
321
|
3.142.7 (2019-12-27)
|
2
322
|
====================
|
3
323
|
|
@@ -30,7 +350,6 @@ Firefox:
|
|
30
350
|
* Fixed a regression when Firefox binary path was not sent to GeckoDriver
|
31
351
|
by default and browser could not be located (issue #7219)
|
32
352
|
|
33
|
-
|
34
353
|
3.142.2 (2019-05-11)
|
35
354
|
====================
|
36
355
|
|
@@ -581,11 +900,11 @@ Ruby:
|
|
581
900
|
* Fix bug in auto detection of drivers which allowed selection of non-executable binaries
|
582
901
|
|
583
902
|
W3C:
|
584
|
-
* Implement #cookie_named and #delete_all_cookies methods (thanks lmtierney)
|
585
|
-
* Implement element #property method (thanks lmtierney)
|
903
|
+
* Implement #cookie_named and #delete_all_cookies methods (thanks lmtierney)
|
904
|
+
* Implement element #property method (thanks lmtierney)
|
586
905
|
|
587
906
|
Chrome:
|
588
|
-
* Fix bug in switches (thanks danvine)
|
907
|
+
* Fix bug in switches (thanks danvine)
|
589
908
|
|
590
909
|
3.0.1 (2016-11-06)
|
591
910
|
===================
|
@@ -607,7 +926,7 @@ Ruby:
|
|
607
926
|
* Add support for latest driver options
|
608
927
|
* Add support for :port parameter for launching driver
|
609
928
|
* Add support for :service_args parameter for driver command line switches
|
610
|
-
* Improve reliability by increasing service shutdown timeout (#2815; thanks John Barbuto )
|
929
|
+
* Improve reliability by increasing service shutdown timeout (#2815; thanks John Barbuto )
|
611
930
|
|
612
931
|
Firefox:
|
613
932
|
* Add support for :firefox_options in geckodriver
|
data/Gemfile
CHANGED
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
|
190
|
+
Copyright 2021 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
ADDED
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# selenium-webdriver
|
2
2
|
|
3
|
-
This gem provides Ruby bindings for
|
4
|
-
and has been tested to work on MRI (2.0 through 2.2),
|
3
|
+
This gem provides Ruby bindings for Selenium and supports MRI >= 2.6
|
5
4
|
|
6
5
|
## Install
|
7
6
|
|
@@ -9,14 +8,14 @@ and has been tested to work on MRI (2.0 through 2.2),
|
|
9
8
|
|
10
9
|
## Links
|
11
10
|
|
12
|
-
*
|
13
|
-
*
|
11
|
+
* https://rubygems.org/gems/selenium-webdriver
|
12
|
+
* https://www.selenium.dev/selenium/docs/api/rb/index.html
|
14
13
|
* https://github.com/SeleniumHQ/selenium/wiki/Ruby-Bindings
|
15
14
|
* https://github.com/SeleniumHQ/selenium/issues
|
16
15
|
|
17
16
|
## License
|
18
17
|
|
19
|
-
Copyright 2009-
|
18
|
+
Copyright 2009-2021 Software Freedom Conservancy
|
20
19
|
|
21
20
|
Licensed to the Software Freedom Conservancy (SFC) under one
|
22
21
|
or more contributor license agreements. See the NOTICE file
|
data/lib/selenium/server.rb
CHANGED
@@ -74,7 +74,7 @@ module Selenium
|
|
74
74
|
|
75
75
|
begin
|
76
76
|
File.open(download_file_name, 'wb') do |destination|
|
77
|
-
|
77
|
+
net_http_start('selenium-release.storage.googleapis.com') do |http|
|
78
78
|
resp = http.request_get("/#{required_version[/(\d+\.\d+)\./, 1]}/#{download_file_name}") do |response|
|
79
79
|
total = response.content_length
|
80
80
|
progress = 0
|
@@ -85,7 +85,7 @@ module Selenium
|
|
85
85
|
segment_count += 1
|
86
86
|
|
87
87
|
if (segment_count % 15).zero?
|
88
|
-
percent =
|
88
|
+
percent = progress.fdiv(total) * 100
|
89
89
|
print "#{CL_RESET}Downloading #{download_file_name}: #{percent.to_i}% (#{progress} / #{total})"
|
90
90
|
segment_count = 0
|
91
91
|
end
|
@@ -97,7 +97,7 @@ module Selenium
|
|
97
97
|
raise Error, "#{resp.code} for #{download_file_name}" unless resp.is_a? Net::HTTPSuccess
|
98
98
|
end
|
99
99
|
end
|
100
|
-
rescue
|
100
|
+
rescue StandardError
|
101
101
|
FileUtils.rm download_file_name if File.exist? download_file_name
|
102
102
|
raise
|
103
103
|
end
|
@@ -111,7 +111,7 @@ module Selenium
|
|
111
111
|
|
112
112
|
def latest
|
113
113
|
require 'rexml/document'
|
114
|
-
|
114
|
+
net_http_start('selenium-release.storage.googleapis.com') do |http|
|
115
115
|
versions = REXML::Document.new(http.get('/').body).root.get_elements('//Contents/Key').map do |e|
|
116
116
|
e.text[/selenium-server-standalone-(\d+\.\d+\.\d+)\.jar/, 1]
|
117
117
|
end
|
@@ -120,43 +120,26 @@ module Selenium
|
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
123
|
-
def
|
123
|
+
def net_http_start(address, &block)
|
124
124
|
http_proxy = ENV['http_proxy'] || ENV['HTTP_PROXY']
|
125
125
|
|
126
126
|
if http_proxy
|
127
127
|
http_proxy = "http://#{http_proxy}" unless http_proxy.start_with?('http://')
|
128
128
|
uri = URI.parse(http_proxy)
|
129
129
|
|
130
|
-
Net::HTTP
|
130
|
+
Net::HTTP.start(address, nil, uri.host, uri.port, &block)
|
131
131
|
else
|
132
|
-
Net::HTTP
|
132
|
+
Net::HTTP.start(address, &block)
|
133
133
|
end
|
134
134
|
end
|
135
135
|
end
|
136
136
|
|
137
137
|
#
|
138
|
-
# The
|
138
|
+
# The Mode of the Server
|
139
|
+
# :standalone, #hub, #node
|
139
140
|
#
|
140
141
|
|
141
|
-
attr_accessor :port
|
142
|
-
|
143
|
-
#
|
144
|
-
# The server timeout
|
145
|
-
#
|
146
|
-
|
147
|
-
attr_accessor :timeout
|
148
|
-
|
149
|
-
#
|
150
|
-
# Whether to launch the server in the background
|
151
|
-
#
|
152
|
-
|
153
|
-
attr_accessor :background
|
154
|
-
|
155
|
-
#
|
156
|
-
# Path to log file, or 'true' for stdout.
|
157
|
-
#
|
158
|
-
|
159
|
-
attr_accessor :log
|
142
|
+
attr_accessor :role, :port, :timeout, :background, :log
|
160
143
|
|
161
144
|
#
|
162
145
|
# @param [String] jar Path to the server jar.
|
@@ -175,11 +158,12 @@ module Selenium
|
|
175
158
|
|
176
159
|
@jar = jar
|
177
160
|
@host = '127.0.0.1'
|
161
|
+
@role = opts.fetch(:role, 'standalone')
|
178
162
|
@port = opts.fetch(:port, 4444)
|
179
163
|
@timeout = opts.fetch(:timeout, 30)
|
180
164
|
@background = opts.fetch(:background, false)
|
181
165
|
@log = opts[:log]
|
182
|
-
|
166
|
+
@log_file = nil
|
183
167
|
@additional_args = []
|
184
168
|
end
|
185
169
|
|
@@ -216,6 +200,10 @@ module Selenium
|
|
216
200
|
|
217
201
|
private
|
218
202
|
|
203
|
+
def selenium4?
|
204
|
+
@jar.match?(/[^.]4\./) || @jar.include?('deploy')
|
205
|
+
end
|
206
|
+
|
219
207
|
def stop_process
|
220
208
|
return unless @process.alive?
|
221
209
|
|
@@ -234,7 +222,11 @@ module Selenium
|
|
234
222
|
@process ||= begin
|
235
223
|
# extract any additional_args that start with -D as options
|
236
224
|
properties = @additional_args.dup - @additional_args.delete_if { |arg| arg[/^-D/] }
|
237
|
-
|
225
|
+
args = ['-jar', @jar]
|
226
|
+
args << @role if selenium4?
|
227
|
+
args << (selenium4? ? '--port' : '-port')
|
228
|
+
args << @port.to_s
|
229
|
+
server_command = ['java'] + properties + args + @additional_args
|
238
230
|
cp = ChildProcess.build(*server_command)
|
239
231
|
WebDriver.logger.debug("Executing Process #{server_command}")
|
240
232
|
|