selenium-webdriver 4.7.0 → 4.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +34 -0
- data/LICENSE +1 -1
- data/NOTICE +1 -1
- data/lib/selenium/server.rb +1 -0
- data/lib/selenium/webdriver/atoms.rb +2 -3
- data/lib/selenium/webdriver/bidi/browsing_context.rb +88 -0
- data/lib/selenium/webdriver/bidi/browsing_context_info.rb +35 -0
- data/lib/selenium/webdriver/bidi/log/base_log_entry.rb +35 -0
- data/lib/selenium/webdriver/bidi/log/console_log_entry.rb +35 -0
- data/lib/selenium/webdriver/bidi/log/generic_log_entry.rb +33 -0
- data/lib/selenium/webdriver/bidi/log/javascript_log_entry.rb +33 -0
- data/lib/selenium/webdriver/bidi/log_inspector.rb +140 -0
- data/lib/selenium/webdriver/bidi/navigate_result.rb +33 -0
- data/lib/selenium/webdriver/bidi/session.rb +13 -0
- data/lib/selenium/webdriver/bidi.rb +2 -1
- data/lib/selenium/webdriver/chrome/driver.rb +19 -29
- data/lib/selenium/webdriver/chrome/features.rb +5 -72
- data/lib/selenium/webdriver/chrome/options.rb +3 -237
- data/lib/selenium/webdriver/chrome/profile.rb +3 -83
- data/lib/selenium/webdriver/chrome/service.rb +3 -18
- data/lib/selenium/webdriver/chromium/driver.rb +61 -0
- data/lib/selenium/webdriver/chromium/features.rb +103 -0
- data/lib/selenium/webdriver/chromium/options.rb +261 -0
- data/lib/selenium/webdriver/chromium/profile.rb +113 -0
- data/lib/selenium/webdriver/chromium/service.rb +42 -0
- data/lib/selenium/webdriver/chromium.rb +32 -0
- data/lib/selenium/webdriver/common/action_builder.rb +11 -48
- data/lib/selenium/webdriver/common/child_process.rb +0 -2
- data/lib/selenium/webdriver/common/driver.rb +34 -25
- data/lib/selenium/webdriver/common/driver_extensions/downloads_files.rb +0 -2
- data/lib/selenium/webdriver/common/driver_extensions/full_page_screenshot.rb +0 -1
- data/lib/selenium/webdriver/common/driver_extensions/has_addons.rb +0 -2
- data/lib/selenium/webdriver/common/driver_extensions/has_apple_permissions.rb +0 -2
- data/lib/selenium/webdriver/common/driver_extensions/has_authentication.rb +0 -2
- data/lib/selenium/webdriver/common/driver_extensions/has_bidi.rb +0 -2
- data/lib/selenium/webdriver/common/driver_extensions/has_casting.rb +0 -1
- data/lib/selenium/webdriver/common/driver_extensions/has_cdp.rb +0 -2
- data/lib/selenium/webdriver/common/driver_extensions/has_context.rb +0 -2
- data/lib/selenium/webdriver/common/driver_extensions/has_debugger.rb +0 -2
- data/lib/selenium/webdriver/common/driver_extensions/has_devtools.rb +0 -2
- data/lib/selenium/webdriver/common/driver_extensions/has_launching.rb +0 -2
- data/lib/selenium/webdriver/common/driver_extensions/has_location.rb +1 -2
- data/lib/selenium/webdriver/common/driver_extensions/has_log_events.rb +0 -1
- data/lib/selenium/webdriver/common/driver_extensions/has_network_conditions.rb +0 -2
- data/lib/selenium/webdriver/common/driver_extensions/has_network_interception.rb +0 -2
- data/lib/selenium/webdriver/common/driver_extensions/has_permissions.rb +0 -2
- data/lib/selenium/webdriver/common/driver_extensions/has_pinned_scripts.rb +0 -2
- data/lib/selenium/webdriver/common/element.rb +6 -6
- data/lib/selenium/webdriver/common/error.rb +0 -2
- data/lib/selenium/webdriver/common/html5/shared_web_storage.rb +2 -2
- data/lib/selenium/webdriver/common/interactions/pointer_actions.rb +3 -3
- data/lib/selenium/webdriver/common/interactions/pointer_move.rb +2 -2
- data/lib/selenium/webdriver/common/interactions/scroll.rb +7 -5
- data/lib/selenium/webdriver/common/logger.rb +10 -2
- data/lib/selenium/webdriver/common/options.rb +30 -8
- data/lib/selenium/webdriver/common/profile_helper.rb +1 -1
- data/lib/selenium/webdriver/common/proxy.rb +1 -1
- data/lib/selenium/webdriver/common/selenium_manager.rb +10 -12
- data/lib/selenium/webdriver/common/service.rb +9 -5
- data/lib/selenium/webdriver/common/service_manager.rb +1 -1
- data/lib/selenium/webdriver/common/shadow_root.rb +1 -2
- data/lib/selenium/webdriver/common/socket_lock.rb +1 -0
- data/lib/selenium/webdriver/common/takes_screenshot.rb +2 -3
- data/lib/selenium/webdriver/common/target_locator.rb +2 -3
- data/lib/selenium/webdriver/common/timeouts.rb +2 -2
- data/lib/selenium/webdriver/common/virtual_authenticator/credential.rb +8 -6
- data/lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator.rb +0 -1
- data/lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator_options.rb +16 -16
- data/lib/selenium/webdriver/common/websocket_connection.rb +1 -2
- data/lib/selenium/webdriver/devtools/console_event.rb +0 -2
- data/lib/selenium/webdriver/devtools/exception_event.rb +0 -2
- data/lib/selenium/webdriver/devtools/mutation_event.rb +0 -2
- data/lib/selenium/webdriver/devtools/network_interceptor.rb +3 -6
- data/lib/selenium/webdriver/devtools/pinned_script.rb +0 -2
- data/lib/selenium/webdriver/devtools/request.rb +0 -2
- data/lib/selenium/webdriver/devtools/response.rb +0 -2
- data/lib/selenium/webdriver/devtools.rb +0 -1
- data/lib/selenium/webdriver/edge/driver.rb +20 -3
- data/lib/selenium/webdriver/edge/features.rb +3 -4
- data/lib/selenium/webdriver/edge/options.rb +3 -5
- data/lib/selenium/webdriver/edge/profile.rb +2 -2
- data/lib/selenium/webdriver/edge/service.rb +2 -2
- data/lib/selenium/webdriver/firefox/driver.rb +19 -2
- data/lib/selenium/webdriver/firefox/features.rb +0 -1
- data/lib/selenium/webdriver/firefox/options.rb +4 -1
- data/lib/selenium/webdriver/firefox/profile.rb +6 -6
- data/lib/selenium/webdriver/firefox/service.rb +0 -1
- data/lib/selenium/webdriver/ie/driver.rb +20 -1
- data/lib/selenium/webdriver/ie/service.rb +1 -2
- data/lib/selenium/webdriver/remote/bridge.rb +8 -15
- data/lib/selenium/webdriver/remote/capabilities.rb +34 -12
- data/lib/selenium/webdriver/remote/commands.rb +0 -2
- data/lib/selenium/webdriver/remote/driver.rb +13 -13
- data/lib/selenium/webdriver/remote/http/curb.rb +0 -2
- data/lib/selenium/webdriver/remote/http/default.rb +1 -0
- data/lib/selenium/webdriver/remote/response.rb +0 -1
- data/lib/selenium/webdriver/safari/driver.rb +20 -1
- data/lib/selenium/webdriver/safari/features.rb +0 -2
- data/lib/selenium/webdriver/safari/options.rb +5 -1
- data/lib/selenium/webdriver/safari.rb +1 -1
- data/lib/selenium/webdriver/support/color.rb +15 -15
- data/lib/selenium/webdriver/support/guards/guard.rb +0 -2
- data/lib/selenium/webdriver/support/guards/guard_condition.rb +0 -2
- data/lib/selenium/webdriver/support/relative_locator.rb +0 -1
- data/lib/selenium/webdriver/version.rb +1 -1
- data/lib/selenium/webdriver.rb +3 -3
- data/selenium-webdriver.gemspec +3 -5
- metadata +25 -41
- data/lib/selenium/webdriver/support/cdp_client_generator.rb +0 -108
- data/lib/selenium/webdriver/support/nightly_version_generator.rb +0 -60
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selenium-webdriver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Rodionov
|
8
8
|
- Titus Fortner
|
9
9
|
- Thomas Walpole
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2023-01-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rexml
|
@@ -94,20 +94,6 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '2.0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rake
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
98
|
name: rspec
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,56 +114,42 @@ dependencies:
|
|
128
114
|
requirements:
|
129
115
|
- - "~>"
|
130
116
|
- !ruby/object:Gem::Version
|
131
|
-
version: '1.
|
117
|
+
version: '1.42'
|
132
118
|
type: :development
|
133
119
|
prerelease: false
|
134
120
|
version_requirements: !ruby/object:Gem::Requirement
|
135
121
|
requirements:
|
136
122
|
- - "~>"
|
137
123
|
- !ruby/object:Gem::Version
|
138
|
-
version: '1.
|
124
|
+
version: '1.42'
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
126
|
name: rubocop-performance
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
142
128
|
requirements:
|
143
129
|
- - "~>"
|
144
130
|
- !ruby/object:Gem::Version
|
145
|
-
version: '1.
|
131
|
+
version: '1.15'
|
146
132
|
type: :development
|
147
133
|
prerelease: false
|
148
134
|
version_requirements: !ruby/object:Gem::Requirement
|
149
135
|
requirements:
|
150
136
|
- - "~>"
|
151
137
|
- !ruby/object:Gem::Version
|
152
|
-
version: '1.
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: rubocop-rake
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ">="
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - ">="
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
138
|
+
version: '1.15'
|
167
139
|
- !ruby/object:Gem::Dependency
|
168
140
|
name: rubocop-rspec
|
169
141
|
requirement: !ruby/object:Gem::Requirement
|
170
142
|
requirements:
|
171
143
|
- - "~>"
|
172
144
|
- !ruby/object:Gem::Version
|
173
|
-
version: '2.
|
145
|
+
version: '2.16'
|
174
146
|
type: :development
|
175
147
|
prerelease: false
|
176
148
|
version_requirements: !ruby/object:Gem::Requirement
|
177
149
|
requirements:
|
178
150
|
- - "~>"
|
179
151
|
- !ruby/object:Gem::Version
|
180
|
-
version: '2.
|
152
|
+
version: '2.16'
|
181
153
|
- !ruby/object:Gem::Dependency
|
182
154
|
name: webmock
|
183
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -249,6 +221,14 @@ files:
|
|
249
221
|
- lib/selenium/webdriver/atoms/isDisplayed.js
|
250
222
|
- lib/selenium/webdriver/atoms/mutationListener.js
|
251
223
|
- lib/selenium/webdriver/bidi.rb
|
224
|
+
- lib/selenium/webdriver/bidi/browsing_context.rb
|
225
|
+
- lib/selenium/webdriver/bidi/browsing_context_info.rb
|
226
|
+
- lib/selenium/webdriver/bidi/log/base_log_entry.rb
|
227
|
+
- lib/selenium/webdriver/bidi/log/console_log_entry.rb
|
228
|
+
- lib/selenium/webdriver/bidi/log/generic_log_entry.rb
|
229
|
+
- lib/selenium/webdriver/bidi/log/javascript_log_entry.rb
|
230
|
+
- lib/selenium/webdriver/bidi/log_inspector.rb
|
231
|
+
- lib/selenium/webdriver/bidi/navigate_result.rb
|
252
232
|
- lib/selenium/webdriver/bidi/session.rb
|
253
233
|
- lib/selenium/webdriver/chrome.rb
|
254
234
|
- lib/selenium/webdriver/chrome/driver.rb
|
@@ -256,6 +236,12 @@ files:
|
|
256
236
|
- lib/selenium/webdriver/chrome/options.rb
|
257
237
|
- lib/selenium/webdriver/chrome/profile.rb
|
258
238
|
- lib/selenium/webdriver/chrome/service.rb
|
239
|
+
- lib/selenium/webdriver/chromium.rb
|
240
|
+
- lib/selenium/webdriver/chromium/driver.rb
|
241
|
+
- lib/selenium/webdriver/chromium/features.rb
|
242
|
+
- lib/selenium/webdriver/chromium/options.rb
|
243
|
+
- lib/selenium/webdriver/chromium/profile.rb
|
244
|
+
- lib/selenium/webdriver/chromium/service.rb
|
259
245
|
- lib/selenium/webdriver/common.rb
|
260
246
|
- lib/selenium/webdriver/common/action_builder.rb
|
261
247
|
- lib/selenium/webdriver/common/alert.rb
|
@@ -382,14 +368,12 @@ files:
|
|
382
368
|
- lib/selenium/webdriver/support.rb
|
383
369
|
- lib/selenium/webdriver/support/abstract_event_listener.rb
|
384
370
|
- lib/selenium/webdriver/support/block_event_listener.rb
|
385
|
-
- lib/selenium/webdriver/support/cdp_client_generator.rb
|
386
371
|
- lib/selenium/webdriver/support/color.rb
|
387
372
|
- lib/selenium/webdriver/support/escaper.rb
|
388
373
|
- lib/selenium/webdriver/support/event_firing_bridge.rb
|
389
374
|
- lib/selenium/webdriver/support/guards.rb
|
390
375
|
- lib/selenium/webdriver/support/guards/guard.rb
|
391
376
|
- lib/selenium/webdriver/support/guards/guard_condition.rb
|
392
|
-
- lib/selenium/webdriver/support/nightly_version_generator.rb
|
393
377
|
- lib/selenium/webdriver/support/relative_locator.rb
|
394
378
|
- lib/selenium/webdriver/support/select.rb
|
395
379
|
- lib/selenium/webdriver/version.rb
|
@@ -402,7 +386,7 @@ metadata:
|
|
402
386
|
github_repo: ssh://github.com/SeleniumHQ/selenium
|
403
387
|
source_code_uri: https://github.com/SeleniumHQ/selenium/tree/trunk/rb
|
404
388
|
rubygems_mfa_required: 'true'
|
405
|
-
post_install_message:
|
389
|
+
post_install_message:
|
406
390
|
rdoc_options: []
|
407
391
|
require_paths:
|
408
392
|
- lib
|
@@ -418,7 +402,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
418
402
|
version: 1.3.1
|
419
403
|
requirements: []
|
420
404
|
rubygems_version: 3.1.6
|
421
|
-
signing_key:
|
405
|
+
signing_key:
|
422
406
|
specification_version: 4
|
423
407
|
summary: Selenium is a browser automation tool for automated testing of webapps and
|
424
408
|
more
|
@@ -1,108 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Licensed to the Software Freedom Conservancy (SFC) under one
|
4
|
-
# or more contributor license agreements. See the NOTICE file
|
5
|
-
# distributed with this work for additional information
|
6
|
-
# regarding copyright ownership. The SFC licenses this file
|
7
|
-
# to you under the Apache License, Version 2.0 (the
|
8
|
-
# "License"); you may not use this file except in compliance
|
9
|
-
# with the License. You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing,
|
14
|
-
# software distributed under the License is distributed on an
|
15
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
16
|
-
# KIND, either express or implied. See the License for the
|
17
|
-
# specific language governing permissions and limitations
|
18
|
-
# under the License.
|
19
|
-
|
20
|
-
require 'erb'
|
21
|
-
require 'fileutils'
|
22
|
-
require 'json'
|
23
|
-
|
24
|
-
module Selenium
|
25
|
-
module WebDriver
|
26
|
-
module Support
|
27
|
-
class CDPClientGenerator
|
28
|
-
# Input JSON files are generated from PDL tasks.
|
29
|
-
TEMPLATE_PATH = File.expand_path('cdp/domain.rb.erb', __dir__)
|
30
|
-
|
31
|
-
RESERVED_KEYWORDS = %w[end].freeze
|
32
|
-
|
33
|
-
def call(output_dir:, version:, browser_protocol_path: nil, js_protocol_path: nil, loader_path: nil, **)
|
34
|
-
@template = ERB.new(File.read(TEMPLATE_PATH))
|
35
|
-
@output_dir = output_dir
|
36
|
-
@loader_path = loader_path || "#{@output_dir}.rb"
|
37
|
-
@version = version
|
38
|
-
|
39
|
-
browser_protocol_path ||= File.expand_path('cdp/browser_protocol.json', __dir__)
|
40
|
-
js_protocol_path ||= File.expand_path('cdp/js_protocol.json', __dir__)
|
41
|
-
|
42
|
-
browser_protocol = JSON.parse(File.read(browser_protocol_path), symbolize_names: true)
|
43
|
-
js_protocol = JSON.parse(File.read(js_protocol_path), symbolize_names: true)
|
44
|
-
|
45
|
-
FileUtils.mkdir_p(@output_dir)
|
46
|
-
|
47
|
-
browser_protocol[:domains].each { |domain| process_domain(domain) }
|
48
|
-
js_protocol[:domains].each { |domain| process_domain(domain) }
|
49
|
-
require_file
|
50
|
-
end
|
51
|
-
|
52
|
-
def process_domain(domain)
|
53
|
-
result = @template.result_with_hash(domain: domain, version: @version.upcase, h: self)
|
54
|
-
filename = File.join(@output_dir, "#{snake_case(domain[:domain])}.rb")
|
55
|
-
File.write(filename, remove_empty_lines(result))
|
56
|
-
end
|
57
|
-
|
58
|
-
def snake_case(string)
|
59
|
-
name = string.gsub('JavaScript', 'Javascript')
|
60
|
-
.gsub(/([A-Z]+)([A-Z][a-z]{2,})/, '\1_\2')
|
61
|
-
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
|
62
|
-
.downcase
|
63
|
-
# Certain CDP parameters conflict with Ruby keywords
|
64
|
-
# so we prefix the name with underscore.
|
65
|
-
name = "_#{name}" if RESERVED_KEYWORDS.include?(name)
|
66
|
-
|
67
|
-
name
|
68
|
-
end
|
69
|
-
|
70
|
-
def kwargs(parameters)
|
71
|
-
parameters = parameters.map do |parameter|
|
72
|
-
if parameter[:optional]
|
73
|
-
"#{snake_case(parameter[:name])}: nil"
|
74
|
-
else
|
75
|
-
"#{snake_case(parameter[:name])}:"
|
76
|
-
end
|
77
|
-
end
|
78
|
-
parameters.join(', ')
|
79
|
-
end
|
80
|
-
|
81
|
-
def remove_empty_lines(string)
|
82
|
-
string.split("\n").grep_v(/^\s+$/).join("\n")
|
83
|
-
end
|
84
|
-
|
85
|
-
def require_file
|
86
|
-
# rubocop:disable Lint/InterpolationCheck
|
87
|
-
dynamic_location = '#{File.dirname(File.absolute_path(__FILE__))}'
|
88
|
-
# rubocop:enable Lint/InterpolationCheck
|
89
|
-
|
90
|
-
require_all = "Dir.glob(\"#{dynamic_location}/#{@version}/*\", &method(:require))"
|
91
|
-
File.write(@loader_path, require_all)
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
if $PROGRAM_NAME == __FILE__
|
99
|
-
browser_protocol_path, js_protocol_path, output_dir, loader_path, version = *ARGV
|
100
|
-
|
101
|
-
Selenium::WebDriver::Support::CDPClientGenerator.new.call(
|
102
|
-
browser_protocol_path: browser_protocol_path,
|
103
|
-
js_protocol_path: js_protocol_path,
|
104
|
-
output_dir: output_dir,
|
105
|
-
loader_path: loader_path,
|
106
|
-
version: version
|
107
|
-
)
|
108
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Licensed to the Software Freedom Conservancy (SFC) under one
|
4
|
-
# or more contributor license agreements. See the NOTICE file
|
5
|
-
# distributed with this work for additional information
|
6
|
-
# regarding copyright ownership. The SFC licenses this file
|
7
|
-
# to you under the Apache License, Version 2.0 (the
|
8
|
-
# "License"); you may not use this file except in compliance
|
9
|
-
# with the License. You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing,
|
14
|
-
# software distributed under the License is distributed on an
|
15
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
16
|
-
# KIND, either express or implied. See the License for the
|
17
|
-
# specific language governing permissions and limitations
|
18
|
-
# under the License.
|
19
|
-
|
20
|
-
require 'date'
|
21
|
-
|
22
|
-
module Selenium
|
23
|
-
module WebDriver
|
24
|
-
module Support
|
25
|
-
|
26
|
-
#
|
27
|
-
# Updates version in `version.rb` file with nightly suffix:
|
28
|
-
# - VERSION = '4.6.1'
|
29
|
-
# + VERSION = '4.6.1.nightly.20221126'
|
30
|
-
#
|
31
|
-
# @api private
|
32
|
-
#
|
33
|
-
|
34
|
-
class NightlyVersionGenerator
|
35
|
-
|
36
|
-
REGEXP = /VERSION = ['"]([\d.]+)['"]/.freeze
|
37
|
-
|
38
|
-
def self.call(version_file, version_suffix)
|
39
|
-
version_suffix ||= Date.today.strftime('%Y%m%d')
|
40
|
-
version_file_contents = File.read(version_file)
|
41
|
-
version_file_contents.gsub!(REGEXP) do
|
42
|
-
old_version = Regexp.last_match(1)
|
43
|
-
new_version = [old_version, 'nightly', version_suffix].join('.')
|
44
|
-
puts("#{old_version} -> #{new_version}")
|
45
|
-
|
46
|
-
"VERSION = '#{new_version}'"
|
47
|
-
end
|
48
|
-
|
49
|
-
File.write(version_file, version_file_contents)
|
50
|
-
end
|
51
|
-
|
52
|
-
end # NightlyVersionGenerator
|
53
|
-
end # Support
|
54
|
-
end # WebDriver
|
55
|
-
end # Selenium
|
56
|
-
|
57
|
-
if __FILE__ == $PROGRAM_NAME
|
58
|
-
version_file, version_suffix = *ARGV
|
59
|
-
Selenium::WebDriver::Support::NightlyVersionGenerator.call(version_file, version_suffix)
|
60
|
-
end
|