selenium-webdriver 2.53.4 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGES +363 -10
- data/LICENSE +1 -1
- data/README.md +2 -3
- data/lib/selenium-webdriver.rb +0 -2
- data/lib/selenium/server.rb +69 -70
- data/lib/selenium/webdriver.rb +32 -23
- data/lib/selenium/webdriver/atoms.rb +18 -0
- data/lib/selenium/webdriver/atoms/getAttribute.js +8 -0
- data/lib/selenium/webdriver/chrome.rb +8 -6
- data/lib/selenium/webdriver/chrome/driver.rb +112 -0
- data/lib/selenium/webdriver/chrome/options.rb +168 -0
- data/lib/selenium/webdriver/chrome/profile.rb +17 -17
- data/lib/selenium/webdriver/chrome/service.rb +22 -89
- data/lib/selenium/webdriver/common.rb +13 -6
- data/lib/selenium/webdriver/common/action_builder.rb +49 -57
- data/lib/selenium/webdriver/common/alert.rb +5 -15
- data/lib/selenium/webdriver/common/bridge_helper.rb +10 -17
- data/lib/selenium/webdriver/common/driver.rb +53 -68
- data/lib/selenium/webdriver/common/driver_extensions/{has_input_devices.rb → has_addons.rb} +13 -23
- data/lib/selenium/webdriver/common/driver_extensions/has_location.rb +4 -8
- data/lib/selenium/webdriver/common/driver_extensions/has_network_connection.rb +4 -7
- data/lib/selenium/webdriver/common/driver_extensions/has_remote_status.rb +0 -4
- data/lib/selenium/webdriver/common/driver_extensions/has_session_id.rb +0 -4
- data/lib/selenium/webdriver/common/driver_extensions/has_touch_screen.rb +1 -5
- data/lib/selenium/webdriver/common/driver_extensions/has_web_storage.rb +0 -5
- data/lib/selenium/webdriver/common/driver_extensions/rotatable.rb +4 -9
- data/lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb +7 -7
- data/lib/selenium/webdriver/common/driver_extensions/uploads_files.rb +2 -7
- data/lib/selenium/webdriver/common/element.rb +57 -39
- data/lib/selenium/webdriver/common/error.rb +204 -106
- data/lib/selenium/webdriver/common/file_reaper.rb +3 -11
- data/lib/selenium/webdriver/common/html5/local_storage.rb +6 -10
- data/lib/selenium/webdriver/common/html5/session_storage.rb +6 -10
- data/lib/selenium/webdriver/common/html5/shared_web_storage.rb +7 -18
- data/lib/selenium/webdriver/{safari/options.rb → common/interactions/input_device.rb} +20 -31
- data/lib/selenium/webdriver/common/interactions/interaction.rb +50 -0
- data/lib/selenium/webdriver/{safari/browser.rb → common/interactions/interactions.rb} +16 -15
- data/lib/selenium/webdriver/common/interactions/key_actions.rb +143 -0
- data/lib/selenium/webdriver/common/interactions/key_input.rb +62 -0
- data/lib/selenium/webdriver/{android.rb → common/interactions/none_input.rb} +11 -6
- data/lib/selenium/webdriver/common/interactions/pointer_actions.rb +353 -0
- data/lib/selenium/webdriver/common/interactions/pointer_input.rb +132 -0
- data/lib/selenium/webdriver/common/keyboard.rb +7 -14
- data/lib/selenium/webdriver/common/keys.rb +99 -82
- data/lib/selenium/webdriver/common/log_entry.rb +3 -6
- data/lib/selenium/webdriver/common/logger.rb +140 -0
- data/lib/selenium/webdriver/common/logs.rb +2 -6
- data/lib/selenium/webdriver/common/mouse.rb +9 -14
- data/lib/selenium/webdriver/common/navigation.rb +2 -6
- data/lib/selenium/webdriver/common/options.rb +20 -23
- data/lib/selenium/webdriver/common/platform.rb +70 -97
- data/lib/selenium/webdriver/common/port_prober.rb +3 -4
- data/lib/selenium/webdriver/common/profile_helper.rb +6 -11
- data/lib/selenium/webdriver/common/proxy.rb +58 -72
- data/lib/selenium/webdriver/common/search_context.rb +22 -29
- data/lib/selenium/webdriver/common/service.rb +161 -0
- data/lib/selenium/webdriver/common/socket_lock.rb +6 -14
- data/lib/selenium/webdriver/common/socket_poller.rb +5 -12
- data/lib/selenium/webdriver/common/target_locator.rb +11 -15
- data/lib/selenium/webdriver/common/timeouts.rb +4 -8
- data/lib/selenium/webdriver/common/touch_action_builder.rb +2 -6
- data/lib/selenium/webdriver/common/touch_screen.rb +19 -23
- data/lib/selenium/webdriver/common/w3c_action_builder.rb +209 -0
- data/lib/selenium/webdriver/{phantomjs.rb → common/w3c_options.rb} +16 -14
- data/lib/selenium/webdriver/common/wait.rb +6 -13
- data/lib/selenium/webdriver/common/window.rb +48 -17
- data/lib/selenium/webdriver/common/zipper.rb +6 -10
- data/lib/selenium/webdriver/edge.rb +5 -12
- data/lib/selenium/webdriver/edge/bridge.rb +32 -63
- data/lib/selenium/webdriver/edge/driver.rb +73 -0
- data/lib/selenium/webdriver/edge/service.rb +18 -87
- data/lib/selenium/webdriver/firefox.rb +20 -11
- data/lib/selenium/webdriver/firefox/binary.rb +40 -56
- data/lib/selenium/webdriver/firefox/driver.rb +48 -0
- data/lib/selenium/webdriver/firefox/extension.rb +18 -8
- data/lib/selenium/webdriver/firefox/extension/prefs.json +3 -11
- data/lib/selenium/webdriver/firefox/extension/webdriver.xpi +0 -0
- data/lib/selenium/webdriver/firefox/launcher.rb +13 -22
- data/lib/selenium/webdriver/firefox/legacy/driver.rb +79 -0
- data/lib/selenium/webdriver/{iphone.rb → firefox/marionette/bridge.rb} +25 -6
- data/lib/selenium/webdriver/firefox/marionette/driver.rb +96 -0
- data/lib/selenium/webdriver/firefox/options.rb +149 -0
- data/lib/selenium/webdriver/firefox/profile.rb +46 -46
- data/lib/selenium/webdriver/firefox/profiles_ini.rb +8 -18
- data/lib/selenium/webdriver/firefox/service.rb +23 -83
- data/lib/selenium/webdriver/firefox/util.rb +0 -4
- data/lib/selenium/webdriver/ie.rb +4 -8
- data/lib/selenium/webdriver/ie/driver.rb +90 -0
- data/lib/selenium/webdriver/ie/options.rb +136 -0
- data/lib/selenium/webdriver/ie/service.rb +58 -0
- data/lib/selenium/webdriver/remote.rb +8 -16
- data/lib/selenium/webdriver/remote/bridge.rb +96 -565
- data/lib/selenium/webdriver/remote/capabilities.rb +76 -94
- data/lib/selenium/webdriver/remote/driver.rb +49 -0
- data/lib/selenium/webdriver/remote/http/common.rb +22 -20
- data/lib/selenium/webdriver/remote/http/curb.rb +9 -12
- data/lib/selenium/webdriver/remote/http/default.rb +54 -41
- data/lib/selenium/webdriver/remote/http/persistent.rb +9 -8
- data/lib/selenium/webdriver/remote/oss/bridge.rb +586 -0
- data/lib/selenium/webdriver/remote/oss/commands.rb +221 -0
- data/lib/selenium/webdriver/remote/response.rb +39 -27
- data/lib/selenium/webdriver/remote/server_error.rb +1 -5
- data/lib/selenium/webdriver/remote/w3c/bridge.rb +573 -0
- data/lib/selenium/webdriver/remote/w3c/capabilities.rb +290 -0
- data/lib/selenium/webdriver/remote/w3c/commands.rb +148 -0
- data/lib/selenium/webdriver/safari.rb +20 -29
- data/lib/selenium/webdriver/{firefox/w3c_bridge.rb → safari/driver.rb} +21 -30
- data/lib/selenium/webdriver/safari/service.rb +57 -0
- data/lib/selenium/webdriver/support.rb +1 -2
- data/lib/selenium/webdriver/support/abstract_event_listener.rb +17 -4
- data/lib/selenium/webdriver/support/block_event_listener.rb +1 -5
- data/lib/selenium/webdriver/support/color.rb +57 -42
- data/lib/selenium/webdriver/support/escaper.rb +41 -0
- data/lib/selenium/webdriver/support/event_firing_bridge.rb +36 -40
- data/lib/selenium/webdriver/support/select.rb +33 -86
- data/selenium-webdriver.gemspec +22 -25
- metadata +254 -261
- data/lib/selenium-client.rb +0 -21
- data/lib/selenium/client.rb +0 -57
- data/lib/selenium/client/base.rb +0 -151
- data/lib/selenium/client/driver.rb +0 -29
- data/lib/selenium/client/errors.rb +0 -28
- data/lib/selenium/client/extensions.rb +0 -132
- data/lib/selenium/client/idiomatic.rb +0 -507
- data/lib/selenium/client/javascript_expression_builder.rb +0 -135
- data/lib/selenium/client/javascript_frameworks/jquery.rb +0 -32
- data/lib/selenium/client/javascript_frameworks/prototype.rb +0 -32
- data/lib/selenium/client/legacy_driver.rb +0 -1722
- data/lib/selenium/client/protocol.rb +0 -123
- data/lib/selenium/client/selenium_helper.rb +0 -49
- data/lib/selenium/rake/server_task.rb +0 -176
- data/lib/selenium/webdriver/android/bridge.rb +0 -68
- data/lib/selenium/webdriver/chrome/bridge.rb +0 -139
- data/lib/selenium/webdriver/common/core_ext/base64.rb +0 -28
- data/lib/selenium/webdriver/common/core_ext/dir.rb +0 -61
- data/lib/selenium/webdriver/common/html5/location.rb +0 -19
- data/lib/selenium/webdriver/common/w3c_error.rb +0 -194
- data/lib/selenium/webdriver/edge/legacy_support.rb +0 -117
- data/lib/selenium/webdriver/firefox/bridge.rb +0 -89
- data/lib/selenium/webdriver/ie/bridge.rb +0 -88
- data/lib/selenium/webdriver/ie/server.rb +0 -133
- data/lib/selenium/webdriver/iphone/bridge.rb +0 -64
- data/lib/selenium/webdriver/phantomjs/bridge.rb +0 -78
- data/lib/selenium/webdriver/phantomjs/service.rb +0 -130
- data/lib/selenium/webdriver/remote/commands.rb +0 -211
- data/lib/selenium/webdriver/remote/w3c_bridge.rb +0 -668
- data/lib/selenium/webdriver/remote/w3c_capabilities.rb +0 -236
- data/lib/selenium/webdriver/remote/w3c_commands.rb +0 -132
- data/lib/selenium/webdriver/safari/bridge.rb +0 -135
- data/lib/selenium/webdriver/safari/resources/client.js +0 -7255
- data/lib/selenium/webdriver/safari/server.rb +0 -187
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 040d77515f5ec4c62675327ab517eec003fbead5a3062766036e81bb9e44412b
|
|
4
|
+
data.tar.gz: d032a845a6bfa1819b0baddb61e93b2185d03623e4834fa55b1fa1090ea5829e
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: ea59ab603478f2713683e681a9d112673e6d0ce54bd7fab0711550cdee256527ddc9b7cc9c0bd1dae248f00274b73f4583365b28ede303f9961b4ffae737545e
|
|
7
|
+
data.tar.gz: 35c08a797df512637253014872e7262aa30ba676b2ee0fd4849175b074a8aaed4640c876ce1aa9da932a7e48ba7f085348b845551015aff4dde7611142f431d5
|
data/CHANGES
CHANGED
|
@@ -1,34 +1,387 @@
|
|
|
1
|
-
|
|
1
|
+
3.8.0 (2017-12-01)
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
Ruby:
|
|
5
|
+
* Removed deprecated Alert#authenticate
|
|
6
|
+
* Removed deprecated :port initialization argument of Remote::Bridge.
|
|
7
|
+
Use :url instead.
|
|
8
|
+
* Removed deprecated Selenium::WebDriver::Remote::W3CCapabilities.
|
|
9
|
+
Use Selenium::WebDriver::Remote::Capabilities instead.
|
|
10
|
+
|
|
11
|
+
IE:
|
|
12
|
+
* Remove deprecated :log_file driver initialization argument.
|
|
13
|
+
Use driver_opts: {log_file: ''} instead.
|
|
14
|
+
* Remove deprecated :log_level driver initialization argument.
|
|
15
|
+
Use driver_opts: {log_level: ''} instead.
|
|
16
|
+
* Remove deprecated :implementation driver initialization argument.
|
|
17
|
+
Use driver_opts: {implementation: ''} instead.
|
|
18
|
+
* Removed deprecated :service_args driver initialization argument.
|
|
19
|
+
Use driver_opts: {args: ['--some-switch']} instead.
|
|
20
|
+
|
|
21
|
+
Chrome:
|
|
22
|
+
* Removed deprecated :service_log_path driver initialization argument.
|
|
23
|
+
Use driver_opts: {log_path: 'path'} instead.
|
|
24
|
+
* Removed deprecated :service_args driver initialization argument.
|
|
25
|
+
Use driver_opts: {args: ['--some-switch']} instead.
|
|
26
|
+
|
|
27
|
+
Firefox:
|
|
28
|
+
* Removed deprecated :service_args driver initialization argument.
|
|
29
|
+
Use driver_opts: {args: ['--some-switch']} instead.
|
|
30
|
+
|
|
31
|
+
Safari:
|
|
32
|
+
* Removed deprecated :service_args driver initialization argument.
|
|
33
|
+
Use driver_opts: {args: ['--some-switch']} instead.
|
|
34
|
+
|
|
35
|
+
Edge:
|
|
36
|
+
* Removed deprecated :service_args driver initialization argument.
|
|
37
|
+
Use driver_opts: {args: ['--some-switch']} instead.
|
|
38
|
+
|
|
39
|
+
3.7.0 (2017-11-03)
|
|
40
|
+
==================
|
|
41
|
+
|
|
42
|
+
Ruby:
|
|
43
|
+
* Added //rb:lint task to check codebase using RuboCop (thanks @RustyNail)
|
|
44
|
+
* Fixed codebase to comply more to Ruby community style guide (thanks @RustyNail)
|
|
45
|
+
* Packaged all dependencies to Selenium repository so that non-Ruby committers
|
|
46
|
+
can build and test Ruby bindings easier
|
|
47
|
+
* Update errors list according to latest changes of specification (thanks @jaysonesmith)
|
|
48
|
+
|
|
49
|
+
Firefox:
|
|
50
|
+
* Added Firefox::Options#headless! shortcut to enable headless mode (thanks @franzliedke)
|
|
51
|
+
|
|
52
|
+
3.6.0 (2017-09-25)
|
|
53
|
+
==================
|
|
54
|
+
|
|
55
|
+
Edge:
|
|
56
|
+
* Fixed a bug when execute_script failed using server + Edge (issue #4651)
|
|
57
|
+
|
|
58
|
+
Firefox:
|
|
59
|
+
* Fixed a bug when web extension failed to install using profile class (issue #4093)
|
|
60
|
+
|
|
61
|
+
PhantomJS:
|
|
62
|
+
* Support is deprecated in favor of headless Chrome/Firefox or HTMLUnit.
|
|
63
|
+
PhantomJS is no longer actively developed, and support will eventually
|
|
64
|
+
be dropped.
|
|
65
|
+
|
|
66
|
+
3.5.2 (2017-09-07)
|
|
67
|
+
==================
|
|
68
|
+
|
|
69
|
+
Ruby:
|
|
70
|
+
* Removed platformVersion from W3C payload (issue #4641)
|
|
71
|
+
* Fixed a bug when proxy type was not compliant to specification (issue #4574)
|
|
72
|
+
* Added support for passing speed to flick action (issue #4549)
|
|
73
|
+
* Using TouchActionBuilder no longer prints mouse/key deprecations
|
|
74
|
+
* Deprecated Alert#authenticate
|
|
75
|
+
* Added support for DEBUG environment variable which enables full debug mode in gem
|
|
76
|
+
|
|
77
|
+
Firefox:
|
|
78
|
+
* Fixed a bug when page load timeout was not properly constructed in new session payload
|
|
79
|
+
* Fixed a bug when GeckoDriver error stacktrace was not displayed (issue #3683)
|
|
80
|
+
|
|
81
|
+
Chrome:
|
|
82
|
+
* Added workaround for the case when findElements call returns null (issue #4555)
|
|
83
|
+
* Chrome::Driver now includes touch actions by default
|
|
84
|
+
|
|
85
|
+
3.5.1 (2017-08-15)
|
|
86
|
+
==================
|
|
87
|
+
|
|
88
|
+
Ruby:
|
|
89
|
+
* Fixed a bug when Chrome/Firefox (and probably other) drivers could not be
|
|
90
|
+
started on JRuby (issue #4453).
|
|
91
|
+
|
|
92
|
+
3.5.0 (2017-08-10)
|
|
93
|
+
==================
|
|
94
|
+
|
|
95
|
+
Firefox:
|
|
96
|
+
* Firefox subprocess output is now only redirected when debug is set (issue #4311)
|
|
97
|
+
* Fixed a bug where non-integers could be sent when setting window rect
|
|
98
|
+
* Fixed Firefox location detection on Windows_x64 (thanks kamenlitchev)
|
|
99
|
+
* Fixed passing of profile with a W3C compatible remote end
|
|
100
|
+
|
|
101
|
+
IE:
|
|
102
|
+
* Added new IE::Options class that should be used to customize browser
|
|
103
|
+
behavior (native events, element scroll behavior, etc).
|
|
104
|
+
The instance of options class can be passed to driver initialization using
|
|
105
|
+
:options key. Old way of passing these customization directly to driver
|
|
106
|
+
initialization is deprecated.
|
|
107
|
+
|
|
108
|
+
3.4.4 (2017-07-13)
|
|
109
|
+
==================
|
|
110
|
+
|
|
111
|
+
Firefox:
|
|
112
|
+
* Added support for GeckoDriver install addon command (issue 4215).
|
|
113
|
+
* Added support for GeckoDriver uninstall addon command (issue 4215).
|
|
114
|
+
* Raise error when passing :firefox_options as capability.
|
|
115
|
+
|
|
116
|
+
Ruby:
|
|
117
|
+
* Fixed a bug when childprocess were leaking /dev/null file descriptor (issue 4285).
|
|
118
|
+
* Make Remote::Driver class so that it can be inherited from.
|
|
119
|
+
|
|
120
|
+
3.4.3 (2017-06-16)
|
|
121
|
+
==================
|
|
122
|
+
|
|
123
|
+
Ruby:
|
|
124
|
+
* Fixed a regression when passing symbol as :desired_capabilities caused NoMethodError (issue 4187).
|
|
125
|
+
|
|
126
|
+
3.4.2 (2017-06-14)
|
|
127
|
+
==================
|
|
128
|
+
|
|
129
|
+
Ruby:
|
|
130
|
+
* Added unhandledPromptBehavior to the list of known capabilities.
|
|
131
|
+
* Added timeouts to the list of known capabilities.
|
|
132
|
+
* Fixed a regression when passing hash as :desired_capabilities caused NoMethodError (issue 4172, thanks Thomas Walpole).
|
|
133
|
+
* Fixed a regression when extension capabilities (the ones that have ":" inside)
|
|
134
|
+
were filtered out when doing protocol handshake.
|
|
135
|
+
* Improved handling of capability names passed as plain camelCased strings
|
|
136
|
+
vs Rubyish snake_cased symbols when doing protocol handshake.
|
|
137
|
+
|
|
138
|
+
Chrome:
|
|
139
|
+
* Fixed a regression when passing :switches to driver initialization was ignored.
|
|
140
|
+
|
|
141
|
+
3.4.1 (2017-06-13)
|
|
142
|
+
==================
|
|
143
|
+
|
|
144
|
+
Ruby:
|
|
145
|
+
* Implemented a new dual-dialect mechanism for communication with drivers
|
|
146
|
+
(a.k.a. protocol handshake). There shouldn't be any noticeable differences
|
|
147
|
+
but since this is a significant refactoring of internal APIs, some bugs
|
|
148
|
+
could slip into the release.
|
|
149
|
+
* Renamed ElementClickIntercepted to ElementClickInterceptedError.
|
|
150
|
+
* Renamed ElementNotInteractable to ElementNotInteractableError.
|
|
151
|
+
* Deprecated W3CCapabilities in favor of Capabilities (it was meant to be private API).
|
|
152
|
+
* Added a warning when trying to save screenshot without .png extension (thanks @abotalov).
|
|
153
|
+
|
|
154
|
+
IE:
|
|
155
|
+
* Added support for both old IEDriver which uses OSS dialect of JSON wire
|
|
156
|
+
protocol (<= 3.4.0) and new IEDriver which uses W3C dialect (not yet released).
|
|
157
|
+
|
|
158
|
+
Safari:
|
|
159
|
+
* Removed runtime dependencies used for old SafariDriver (u.g. websocket).
|
|
160
|
+
|
|
161
|
+
Chrome:
|
|
162
|
+
* Added new Chrome::Options class that should be used to customize browser
|
|
163
|
+
behavior (command line arguments, extensions, preferences, mobile emulation, etc.).
|
|
164
|
+
The instance of options class can be passed to driver initialization using
|
|
165
|
+
:options key. Old way of passing these customization directly to driver
|
|
166
|
+
initialization is deprecated.
|
|
167
|
+
|
|
168
|
+
Firefox:
|
|
169
|
+
* Added new Firefox::Options class that should be used to customize browser
|
|
170
|
+
behavior (command line arguments, profile, preferences, Firefox binary, etc.).
|
|
171
|
+
The instance of options class can be passed to driver initialization using
|
|
172
|
+
:options key. Old way of passing these customization directly to driver
|
|
173
|
+
initialization is deprecated.
|
|
174
|
+
|
|
175
|
+
3.4.0 (2017-04-21)
|
|
2
176
|
===================
|
|
3
177
|
|
|
178
|
+
Edge:
|
|
179
|
+
* Fix bug when response is not wrapped with "value"
|
|
180
|
+
|
|
4
181
|
Firefox:
|
|
5
|
-
*
|
|
182
|
+
* Support geckodriver v0.16
|
|
183
|
+
|
|
184
|
+
Ruby:
|
|
185
|
+
* Support ElementClickIntercepted error from W3C spec
|
|
186
|
+
* Support ElementNotInteractable error from W3C spec
|
|
187
|
+
* Implement window rect commands
|
|
188
|
+
* Implement window minimize command
|
|
6
189
|
|
|
7
|
-
|
|
190
|
+
3.3.0 (2017-03-07)
|
|
8
191
|
===================
|
|
9
192
|
|
|
10
193
|
Firefox:
|
|
11
|
-
*
|
|
194
|
+
* geckodriver v0.15 or later is required
|
|
195
|
+
|
|
196
|
+
W3C:
|
|
197
|
+
* Support for command response data to be wrapped in a 'value' key
|
|
198
|
+
* Support for updated timeout formats
|
|
199
|
+
|
|
200
|
+
3.2.2 (2017-03-01)
|
|
201
|
+
===================
|
|
202
|
+
|
|
203
|
+
Ruby:
|
|
204
|
+
* Fix bug for supporting Logger output on Ruby versions < 2.3
|
|
205
|
+
* Add more logging and adjust output levels
|
|
206
|
+
|
|
207
|
+
Remote:
|
|
208
|
+
* Support for creating Remote session with browser name and url parameters
|
|
12
209
|
|
|
13
|
-
2.
|
|
210
|
+
3.2.1 (2017-02-24)
|
|
14
211
|
===================
|
|
15
212
|
|
|
16
213
|
Ruby:
|
|
17
|
-
* Fix bug for
|
|
214
|
+
* Fix bug for supporting Logger on Ruby versions < 2.3
|
|
18
215
|
|
|
19
|
-
2.
|
|
216
|
+
3.2.0 (2017-02-22)
|
|
217
|
+
===================
|
|
218
|
+
|
|
219
|
+
Ruby:
|
|
220
|
+
* Implement new Logger class
|
|
221
|
+
* Fix issue with chromedriver process leader incompatibility on Win7 (issue 3512)
|
|
222
|
+
|
|
223
|
+
3.1.0 (2017-02-14)
|
|
224
|
+
===================
|
|
225
|
+
|
|
226
|
+
Firefox:
|
|
227
|
+
* implement W3C actions endpoint
|
|
228
|
+
|
|
229
|
+
3.0.8 (2017-02-08)
|
|
230
|
+
===================
|
|
231
|
+
|
|
232
|
+
Firefox:
|
|
233
|
+
* Fix signature of element returned from #active_element
|
|
234
|
+
|
|
235
|
+
3.0.7 (2017-02-06)
|
|
236
|
+
===================
|
|
237
|
+
|
|
238
|
+
Firefox:
|
|
239
|
+
* Fix signature of element arrays returned from #find_elements (issue 3471)
|
|
240
|
+
|
|
241
|
+
3.0.6 (2017-02-05)
|
|
242
|
+
===================
|
|
243
|
+
|
|
244
|
+
Firefox:
|
|
245
|
+
* Implement W3C window position
|
|
246
|
+
* Update implementation for W3C send text to alert
|
|
247
|
+
* Implement timeout settings
|
|
248
|
+
* Remove default capabilities (thanks lmtierney)
|
|
249
|
+
* Fix signature of elements returned from #execute_script (thanks Thomas Walpole)
|
|
250
|
+
|
|
251
|
+
3.0.5 (2016-12-27)
|
|
252
|
+
===================
|
|
253
|
+
|
|
254
|
+
Ruby:
|
|
255
|
+
* Support for Ruby 2.4.0 (Thanks jamespdo)
|
|
256
|
+
|
|
257
|
+
3.0.4 (2016-12-21)
|
|
258
|
+
===================
|
|
259
|
+
|
|
260
|
+
Firefox:
|
|
261
|
+
* Implement profile support via geckodriver (#2933 thanks lmtierney)
|
|
262
|
+
|
|
263
|
+
Ruby:
|
|
264
|
+
* Fix bug preventing use of Curb client (#2951 thanks clarkenciel)
|
|
265
|
+
* Support Net::HTTP::Persistent version 3 (#3219 thanks Pete Johns)
|
|
266
|
+
* Allow Net::HTTP::Default to set open_timout and read_timeout independently (#3264 thanks richseviora)
|
|
267
|
+
* Change default for Net::HTTP::Default#open_timeout to facilitate debuggers (#3264 thanks richseviora)
|
|
268
|
+
|
|
269
|
+
3.0.3 (2016-11-26)
|
|
270
|
+
===================
|
|
271
|
+
|
|
272
|
+
Ruby:
|
|
273
|
+
* Allow drivers to be executed from batch files on Windows
|
|
274
|
+
|
|
275
|
+
3.0.2 (2016-11-25)
|
|
276
|
+
===================
|
|
277
|
+
|
|
278
|
+
Ruby:
|
|
279
|
+
* Implement #driver_path as parameter when initializing a driver (thanks lmtierney)
|
|
280
|
+
* Improve Ruby syntax in driver commands (thanks joe_schulte)
|
|
281
|
+
* Improve performance when shutting down drivers (thanks lmtierney)
|
|
282
|
+
* Fix bug for finding open ports on Windows (thanks kou1okada)
|
|
283
|
+
* Fix bug in auto detection of drivers which allowed selection of non-executable binaries
|
|
284
|
+
|
|
285
|
+
W3C:
|
|
286
|
+
* Implement #cookie_named and #delete_all_cookies methods (thanks lmtierney)
|
|
287
|
+
* Implement element #property method (thanks lmtierney)
|
|
288
|
+
|
|
289
|
+
Chrome:
|
|
290
|
+
* Fix bug in switches (thanks danvine)
|
|
291
|
+
|
|
292
|
+
3.0.1 (2016-11-06)
|
|
293
|
+
===================
|
|
294
|
+
|
|
295
|
+
Ruby:
|
|
296
|
+
* Always send JSON Wire Protocol commands to server instead of W3C commands
|
|
297
|
+
|
|
298
|
+
3.0.0 (2016-10-13)
|
|
299
|
+
===================
|
|
300
|
+
|
|
301
|
+
Firefox:
|
|
302
|
+
* Update :firefox_options support for geckodriver 0.11
|
|
303
|
+
|
|
304
|
+
3.0.0.beta4 (2016-09-29)
|
|
305
|
+
===================
|
|
306
|
+
|
|
307
|
+
Ruby:
|
|
308
|
+
* Remove support for deprecated driver options
|
|
309
|
+
* Add support for latest driver options
|
|
310
|
+
* Add support for :port parameter for launching driver
|
|
311
|
+
* Add support for :service_args parameter for driver command line switches
|
|
312
|
+
* Improve reliability by increasing service shutdown timeout (#2815; thanks John Barbuto )
|
|
313
|
+
|
|
314
|
+
Firefox:
|
|
315
|
+
* Add support for :firefox_options in geckodriver
|
|
316
|
+
|
|
317
|
+
Safari:
|
|
318
|
+
* Remove support for legacy Safari driver (use Apple's driver built in to Safari 10+)
|
|
319
|
+
|
|
320
|
+
Chrome:
|
|
321
|
+
* Set chromedriver to not log by default
|
|
322
|
+
|
|
323
|
+
3.0.0.beta3.1 (2016-09-03)
|
|
324
|
+
===================
|
|
325
|
+
|
|
326
|
+
Firefox:
|
|
327
|
+
* Fixed bug - legacy firefox extension included in gem
|
|
328
|
+
|
|
329
|
+
3.0.0.beta3 (2016-09-01)
|
|
20
330
|
===================
|
|
21
331
|
|
|
22
332
|
Firefox:
|
|
23
|
-
*
|
|
24
|
-
* Escape selector when converting to CSS (issue 2235)
|
|
333
|
+
* Implemented w3c getAttribute with javascript atom
|
|
25
334
|
|
|
26
|
-
|
|
335
|
+
3.0.0.beta2.1 (2016-08-03)
|
|
336
|
+
===================
|
|
337
|
+
|
|
338
|
+
Ruby:
|
|
339
|
+
* Fixed bug in collections
|
|
340
|
+
|
|
341
|
+
3.0.0.beta2 (2016-08-02)
|
|
342
|
+
===================
|
|
343
|
+
|
|
344
|
+
Firefox:
|
|
345
|
+
* Fixed bug with form submission
|
|
346
|
+
* Improved w3c element handling
|
|
347
|
+
|
|
348
|
+
3.0.0.beta1 (2016-07-28)
|
|
349
|
+
===================
|
|
350
|
+
|
|
351
|
+
Ruby:
|
|
352
|
+
* Remove support for RC client
|
|
353
|
+
* Remove support for Ruby < 2.0
|
|
354
|
+
* Update code to support designated style guidelines
|
|
355
|
+
* Chrome/GeckoDriver/PhantomJS/IE/Edge drivers are refactored to use standard
|
|
356
|
+
service class (issue 1797)
|
|
357
|
+
* Option `:timeout` was removed from IE server (issue 1797)
|
|
358
|
+
|
|
359
|
+
Chrome:
|
|
360
|
+
* Remove override of default chromedriver behavior for chrome.detach (issue 2418)
|
|
361
|
+
|
|
362
|
+
Firefox:
|
|
363
|
+
* Rename wires to geckodriver
|
|
364
|
+
* Change default usage from FirefoxDriver to geckodriver
|
|
365
|
+
|
|
366
|
+
Safari:
|
|
367
|
+
* Initial support for Apple's Safari Driver in Sierra (issue #2475)
|
|
368
|
+
|
|
369
|
+
Android and iPhone:
|
|
370
|
+
* Remove support for deprecated classes (Issue #2476)
|
|
371
|
+
|
|
372
|
+
2.53.0 (2016-03-15)
|
|
27
373
|
===================
|
|
28
374
|
|
|
29
375
|
Ruby:
|
|
30
376
|
* Removed dependency on "multi_json" (issue 1632)
|
|
31
377
|
* Properly handle namespaces in install manifest of Firefox add-ons (issue 1143)
|
|
378
|
+
* Improve error handling when stopping browsers (thanks bsedat)
|
|
379
|
+
* Fix deselecting options in select lists (thanks glib-briia)
|
|
380
|
+
* Fix w3c error handling
|
|
381
|
+
* Update w3c Capabilities support
|
|
382
|
+
|
|
383
|
+
IE:
|
|
384
|
+
* support for alert credentials (issue #1698, thanks Alan Baird & trabulmonkee)
|
|
32
385
|
|
|
33
386
|
2.52.0 (2016-02-12)
|
|
34
387
|
===================
|
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 2016 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/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# selenium-webdriver
|
|
2
2
|
|
|
3
3
|
This gem provides Ruby bindings for WebDriver
|
|
4
|
-
and has been tested to work on MRI (
|
|
5
|
-
JRuby and Rubinius.
|
|
4
|
+
and has been tested to work on MRI (2.0 through 2.2),
|
|
6
5
|
|
|
7
6
|
## Install
|
|
8
7
|
|
|
@@ -17,7 +16,7 @@ JRuby and Rubinius.
|
|
|
17
16
|
|
|
18
17
|
## License
|
|
19
18
|
|
|
20
|
-
Copyright 2009-
|
|
19
|
+
Copyright 2009-2017 Software Freedom Conservancy
|
|
21
20
|
|
|
22
21
|
Licensed to the Software Freedom Conservancy (SFC) under one
|
|
23
22
|
or more contributor license agreements. See the NOTICE file
|
data/lib/selenium-webdriver.rb
CHANGED
data/lib/selenium/server.rb
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
#
|
|
3
1
|
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
4
2
|
# or more contributor license agreements. See the NOTICE file
|
|
5
3
|
# distributed with this work for additional information
|
|
@@ -22,7 +20,6 @@ require 'selenium/webdriver/common/socket_poller'
|
|
|
22
20
|
require 'net/http'
|
|
23
21
|
|
|
24
22
|
module Selenium
|
|
25
|
-
|
|
26
23
|
#
|
|
27
24
|
# Wraps the remote server jar
|
|
28
25
|
#
|
|
@@ -66,59 +63,72 @@ module Selenium
|
|
|
66
63
|
# Download the given version of the selenium-server-standalone jar.
|
|
67
64
|
#
|
|
68
65
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
class << self
|
|
67
|
+
def download(required_version)
|
|
68
|
+
required_version = latest if required_version == :latest
|
|
69
|
+
download_file_name = "selenium-server-standalone-#{required_version}.jar"
|
|
72
70
|
|
|
73
|
-
|
|
74
|
-
return download_file_name
|
|
75
|
-
end
|
|
71
|
+
return download_file_name if File.exist? download_file_name
|
|
76
72
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if segment_count % 15 == 0
|
|
90
|
-
percent = (progress.to_f / total.to_f) * 100
|
|
91
|
-
print "#{CL_RESET}Downloading #{download_file_name}: #{percent.to_i}% (#{progress} / #{total})"
|
|
92
|
-
segment_count = 0
|
|
93
|
-
end
|
|
73
|
+
begin
|
|
74
|
+
open(download_file_name, 'wb') do |destination|
|
|
75
|
+
net_http.start('selenium-release.storage.googleapis.com') do |http|
|
|
76
|
+
resp = http.request_get("/#{required_version[/(\d+\.\d+)\./, 1]}/#{download_file_name}") do |response|
|
|
77
|
+
total = response.content_length
|
|
78
|
+
progress = 0
|
|
79
|
+
segment_count = 0
|
|
80
|
+
|
|
81
|
+
response.read_body do |segment|
|
|
82
|
+
progress += segment.length
|
|
83
|
+
segment_count += 1
|
|
94
84
|
|
|
95
|
-
|
|
85
|
+
if (segment_count % 15).zero?
|
|
86
|
+
percent = (progress.to_f / total.to_f) * 100
|
|
87
|
+
print "#{CL_RESET}Downloading #{download_file_name}: #{percent.to_i}% (#{progress} / #{total})"
|
|
88
|
+
segment_count = 0
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
destination.write(segment)
|
|
92
|
+
end
|
|
96
93
|
end
|
|
97
|
-
end
|
|
98
94
|
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
unless resp.is_a? Net::HTTPSuccess
|
|
96
|
+
raise Error, "#{resp.code} for #{download_file_name}"
|
|
97
|
+
end
|
|
101
98
|
end
|
|
102
99
|
end
|
|
100
|
+
rescue
|
|
101
|
+
FileUtils.rm download_file_name if File.exist? download_file_name
|
|
102
|
+
raise
|
|
103
103
|
end
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
raise
|
|
104
|
+
|
|
105
|
+
download_file_name
|
|
107
106
|
end
|
|
108
107
|
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
#
|
|
109
|
+
# Ask Google Code what the latest selenium-server-standalone version is.
|
|
110
|
+
#
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
def latest
|
|
113
|
+
require 'rexml/document'
|
|
114
|
+
net_http.start('selenium-release.storage.googleapis.com') do |http|
|
|
115
|
+
REXML::Document.new(http.get('/').body).root.get_elements('//Contents/Key').map do |e|
|
|
116
|
+
e.text[/selenium-server-standalone-(\d+\.\d+\.\d+)\.jar/, 1]
|
|
117
|
+
end.compact.max
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def net_http
|
|
122
|
+
http_proxy = ENV['http_proxy'] || ENV['HTTP_PROXY']
|
|
115
123
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
124
|
+
if http_proxy
|
|
125
|
+
http_proxy = "http://#{http_proxy}" unless http_proxy.start_with?('http://')
|
|
126
|
+
uri = URI.parse(http_proxy)
|
|
127
|
+
|
|
128
|
+
Net::HTTP::Proxy(uri.host, uri.port)
|
|
129
|
+
else
|
|
130
|
+
Net::HTTP
|
|
131
|
+
end
|
|
122
132
|
end
|
|
123
133
|
end
|
|
124
134
|
|
|
@@ -162,7 +172,7 @@ module Selenium
|
|
|
162
172
|
raise Errno::ENOENT, jar unless File.exist?(jar)
|
|
163
173
|
|
|
164
174
|
@jar = jar
|
|
165
|
-
@host =
|
|
175
|
+
@host = '127.0.0.1'
|
|
166
176
|
@port = opts.fetch(:port, 4444)
|
|
167
177
|
@timeout = opts.fetch(:timeout, 30)
|
|
168
178
|
@background = opts.fetch(:background, false)
|
|
@@ -180,7 +190,7 @@ module Selenium
|
|
|
180
190
|
|
|
181
191
|
def stop
|
|
182
192
|
begin
|
|
183
|
-
Net::HTTP.get(@host,
|
|
193
|
+
Net::HTTP.get(@host, '/selenium-server/driver/?cmd=shutDownSeleniumServer', @port)
|
|
184
194
|
rescue Errno::ECONNREFUSED
|
|
185
195
|
end
|
|
186
196
|
|
|
@@ -195,7 +205,7 @@ module Selenium
|
|
|
195
205
|
end
|
|
196
206
|
|
|
197
207
|
def <<(arg)
|
|
198
|
-
if arg.
|
|
208
|
+
if arg.is_a?(Array)
|
|
199
209
|
@additional_args += arg
|
|
200
210
|
else
|
|
201
211
|
@additional_args << arg.to_s
|
|
@@ -204,19 +214,6 @@ module Selenium
|
|
|
204
214
|
|
|
205
215
|
private
|
|
206
216
|
|
|
207
|
-
def self.net_http
|
|
208
|
-
http_proxy = ENV['http_proxy'] || ENV['HTTP_PROXY']
|
|
209
|
-
|
|
210
|
-
if http_proxy
|
|
211
|
-
http_proxy = "http://#{http_proxy}" unless http_proxy.start_with?("http://")
|
|
212
|
-
uri = URI.parse(http_proxy)
|
|
213
|
-
|
|
214
|
-
Net::HTTP::Proxy(uri.host, uri.port)
|
|
215
|
-
else
|
|
216
|
-
Net::HTTP
|
|
217
|
-
end
|
|
218
|
-
end
|
|
219
|
-
|
|
220
217
|
def stop_process
|
|
221
218
|
return unless @process.alive?
|
|
222
219
|
|
|
@@ -233,11 +230,16 @@ module Selenium
|
|
|
233
230
|
|
|
234
231
|
def process
|
|
235
232
|
@process ||= (
|
|
236
|
-
|
|
233
|
+
# extract any additional_args that start with -D as options
|
|
234
|
+
properties = @additional_args.dup - @additional_args.delete_if { |arg| arg[/^-D/] }
|
|
235
|
+
server_command = ['java'] + properties + ['-jar', @jar, '-port', @port.to_s] + @additional_args
|
|
236
|
+
cp = ChildProcess.build(*server_command)
|
|
237
|
+
WebDriver.logger.debug("Executing Process #{server_command}")
|
|
238
|
+
|
|
237
239
|
io = cp.io
|
|
238
240
|
|
|
239
|
-
if @log.
|
|
240
|
-
@log_file = File.open(@log,
|
|
241
|
+
if @log.is_a?(String)
|
|
242
|
+
@log_file = File.open(@log, 'w')
|
|
241
243
|
io.stdout = io.stderr = @log_file
|
|
242
244
|
elsif @log
|
|
243
245
|
io.inherit!
|
|
@@ -250,20 +252,17 @@ module Selenium
|
|
|
250
252
|
end
|
|
251
253
|
|
|
252
254
|
def poll_for_service
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
end
|
|
255
|
+
return if socket.connected?
|
|
256
|
+
raise Error, "remote server not launched in #{@timeout} seconds"
|
|
256
257
|
end
|
|
257
258
|
|
|
258
259
|
def poll_for_shutdown
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
end
|
|
260
|
+
return if socket.closed?
|
|
261
|
+
raise Error, "remote server not stopped in #{@timeout} seconds"
|
|
262
262
|
end
|
|
263
263
|
|
|
264
264
|
def socket
|
|
265
265
|
@socket ||= WebDriver::SocketPoller.new(@host, @port, @timeout)
|
|
266
266
|
end
|
|
267
|
-
|
|
268
267
|
end # Server
|
|
269
268
|
end # Selenium
|