selenium-webdriver 4.10.0 → 4.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57f5a526cd47137c459f2eb349f03fbebc28b428a4d1eba1aed962cb8b32f0d4
4
- data.tar.gz: 0e246eec8fc308f54bb651245cebaf3610a5abf4f6027728a6e96210b72a397e
3
+ metadata.gz: 55c2b164be56b90064957852c6b1f890f9cda063d5c0ef164752b7c67f6e40bb
4
+ data.tar.gz: 778d0c6d2450a3d178d709762c76b9ef2c24832131d4487f6c84b5789a32b1de
5
5
  SHA512:
6
- metadata.gz: 679674b291a9b3da8d41a917ed782d14743150b524767a915e464e39751971ce9420e7a21127dcf10ca070f3bd7bff14a61690c028b013daab8d638550f38a61
7
- data.tar.gz: a39c8fdecf8a60ad8736aa3392bba7f540c692bdba451546463b8db4e9b967d81d1d30ca665aedb99901e6f173deb3af29fcdfcd7d7c087783b8e24358ae8814
6
+ metadata.gz: 6777b04b259f2e7be27d7c2635f77b0e9006464f931e1e79a1e10f517474b71344534a8b02ba84445801581f4c50cb79901d15ef8e74133c08357625e5ad9de6
7
+ data.tar.gz: 5f1e3af40a4bbcc3e4e77407321d64b1e6920ca91fcf7605bce780d42138fd587bfc951563205d8cf6e4b63952e7e4e35dd52aba496fcb1e468e6a086c81c92d
data/CHANGES CHANGED
@@ -1,3 +1,15 @@
1
+ 4.11.0 (2023-07-31)
2
+ =========================
3
+ Ruby:
4
+ * Made network interception threads fail silently (#12226)
5
+ * Have Selenium Manager binary locate drivers on PATH (#12345)
6
+ * Add browser output from selenium manager to options (#12398)
7
+ * Remove deprecated code (#12417)
8
+ BiDi:
9
+ * Released selenium-devtools 0.115.0 (supports CDP v85, v113, v114, v115)
10
+ Edge:
11
+ * Adding ignore process match for IE Mode across bindings (#12279)
12
+
1
13
  4.10.0 (2023-06-07)
2
14
  =========================
3
15
  Ruby:
data/README.md CHANGED
@@ -15,7 +15,7 @@ This gem provides Ruby bindings for Selenium and supports MRI >= 3.0.
15
15
 
16
16
  ## License
17
17
 
18
- Copyright 2009-2021 Software Freedom Conservancy
18
+ Copyright 2009-2023 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
@@ -18,6 +18,7 @@
18
18
  # under the License.
19
19
 
20
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
 
@@ -165,7 +166,7 @@ module Selenium
165
166
  # :standalone, #hub, #node
166
167
  #
167
168
 
168
- attr_accessor :role, :port, :timeout, :background, :log
169
+ attr_accessor :role, :host, :port, :timeout, :background, :log
169
170
 
170
171
  #
171
172
  # @param [String] jar Path to the server jar.
@@ -185,7 +186,7 @@ module Selenium
185
186
  @jar = jar
186
187
  @host = '127.0.0.1'
187
188
  @role = opts.fetch(:role, 'standalone')
188
- @port = opts.fetch(:port, 4444)
189
+ @port = opts.fetch(:port, WebDriver::PortProber.above(4444))
189
190
  @timeout = opts.fetch(:timeout, 30)
190
191
  @background = opts.fetch(:background, false)
191
192
  @additional_args = opts.fetch(:args, [])
@@ -207,12 +208,6 @@ module Selenium
207
208
  end
208
209
 
209
210
  def stop
210
- begin
211
- Net::HTTP.get(@host, '/selenium-server/driver/?cmd=shutDownSeleniumServer', @port)
212
- rescue Errno::ECONNREFUSED
213
- nil
214
- end
215
-
216
211
  stop_process if @process
217
212
  poll_for_shutdown
218
213
 
@@ -234,13 +229,7 @@ module Selenium
234
229
  private
235
230
 
236
231
  def stop_process
237
- return unless @process.alive?
238
-
239
- begin
240
- @process.poll_for_exit(5)
241
- rescue WebDriver::ChildProcess::TimeoutError
242
- @process.stop
243
- end
232
+ @process.stop
244
233
  rescue Errno::ECHILD
245
234
  # already dead
246
235
  ensure
@@ -254,7 +243,6 @@ module Selenium
254
243
  args = ['-jar', @jar, @role, '--port', @port.to_s]
255
244
  server_command = ['java'] + properties + args + @additional_args
256
245
  cp = WebDriver::ChildProcess.build(*server_command)
257
- WebDriver.logger.debug("Executing Process #{server_command}", id: :server)
258
246
 
259
247
  if @log.is_a?(String)
260
248
  cp.io = @log
@@ -17,12 +17,10 @@
17
17
  # specific language governing permissions and limitations
18
18
  # under the License.
19
19
 
20
- require 'selenium/webdriver/chromium/service'
21
-
22
20
  module Selenium
23
21
  module WebDriver
24
22
  module Chrome
25
- class Service < Chromium::Service
23
+ class Service < WebDriver::Service
26
24
  DEFAULT_PORT = 9515
27
25
  EXECUTABLE = 'chromedriver'
28
26
  SHUTDOWN_SUPPORTED = true
@@ -159,24 +159,6 @@ module Selenium
159
159
  @options[:prefs][name] = value
160
160
  end
161
161
 
162
- #
163
- # Run Chrome in headless mode.
164
- # Old headless uses a non-production browser and is set with `--headless`
165
- # Native headless from v86 - v108 is set with `--headless=chrome`
166
- # Native headless from v109+ is set with `--headless=new`
167
- #
168
- # @example Enable headless mode
169
- # options = Selenium::WebDriver::Chrome::Options.new
170
- # options.headless!
171
- #
172
-
173
- def headless!
174
- WebDriver.logger.deprecate('`Options#headless!`',
175
- "`Options#add_argument('--headless=new')`",
176
- id: :headless)
177
- add_argument '--headless'
178
- end
179
-
180
162
  #
181
163
  # Add emulation device information
182
164
  #
@@ -26,7 +26,6 @@ module Selenium
26
26
  autoload :Driver, 'selenium/webdriver/chromium/driver'
27
27
  autoload :Profile, 'selenium/webdriver/chromium/profile'
28
28
  autoload :Options, 'selenium/webdriver/chromium/options'
29
- autoload :Service, 'selenium/webdriver/chromium/service'
30
29
  end # Chromium
31
30
  end # WebDriver
32
31
  end # Selenium
@@ -81,11 +81,11 @@ module Selenium
81
81
  end
82
82
 
83
83
  def exited?
84
- return unless @pid
84
+ return false unless @pid
85
85
 
86
86
  WebDriver.logger.debug("Checking if #{@pid} is exited:", id: :process)
87
87
  _, @status = Process.waitpid2(@pid, Process::WNOHANG | Process::WUNTRACED) if @status.nil?
88
- return if @status.nil?
88
+ return false if @status.nil?
89
89
 
90
90
  exit_code = @status.exitstatus || @status.termsig
91
91
  WebDriver.logger.debug(" -> exit code is #{exit_code.inspect}", id: :process)
@@ -23,7 +23,6 @@ module Selenium
23
23
  def self.path(options, klass)
24
24
  path = klass.driver_path
25
25
  path = path.call if path.is_a?(Proc)
26
- path ||= Platform.find_binary(klass::EXECUTABLE)
27
26
 
28
27
  path ||= begin
29
28
  SeleniumManager.driver_path(options) unless options.is_a?(Remote::Capabilities)
@@ -32,7 +31,6 @@ module Selenium
32
31
  end
33
32
 
34
33
  begin
35
- Platform.assert_file(path)
36
34
  Platform.assert_executable(path)
37
35
  rescue TypeError
38
36
  raise Error::NoSuchDriverError, "Unable to locate or obtain #{klass::EXECUTABLE}"
@@ -86,12 +86,6 @@ module Selenium
86
86
 
87
87
  def add_option(name, value = nil)
88
88
  name, value = name.first if value.nil? && name.is_a?(Hash)
89
-
90
- unless name.to_s.include?(':')
91
- WebDriver.logger.deprecate('Options#add_option for w3c or browser specific capabilities',
92
- 'applicable attribute accessors or pass into constructor',
93
- id: :add_option)
94
- end
95
89
  @options[name] = value
96
90
  end
97
91
 
@@ -113,24 +107,11 @@ module Selenium
113
107
  w3c_options = process_w3c_options(options)
114
108
 
115
109
  browser_options = self.class::CAPABILITIES.each_with_object({}) do |(capability_alias, capability_name), hash|
116
- from_name = options.delete(capability_name)
117
- from_alias = options.delete(capability_alias)
118
- capability_value = if !from_name.nil? && capability_alias != capability_name
119
- WebDriver.logger.deprecate("#{capability_name} as option",
120
- capability_alias.to_s, id: :option_symbols)
121
- from_name
122
- elsif !from_alias.nil?
123
- from_alias
124
- end
125
-
110
+ capability_value = options.delete(capability_alias)
126
111
  hash[capability_name] = capability_value unless capability_value.nil?
127
112
  end
128
113
 
129
- unless options.empty?
130
- msg = 'These options are not w3c compliant and will result in failures in a future release'
131
- WebDriver.logger.warn("#{msg}: #{options}", id: :w3c_options)
132
- browser_options.merge!(options)
133
- end
114
+ raise Error::WebDriverError, "These options are not w3c compliant: #{options}" unless options.empty?
134
115
 
135
116
  browser_options = {self.class::KEY => browser_options} if defined?(self.class::KEY)
136
117
 
@@ -145,7 +126,7 @@ module Selenium
145
126
  end
146
127
 
147
128
  def process_w3c_options(options)
148
- w3c_options = options.select { |key, _val| w3c?(key) }
129
+ w3c_options = options.select { |key, val| w3c?(key) && !val.nil? }
149
130
  w3c_options[:unhandled_prompt_behavior] &&= w3c_options[:unhandled_prompt_behavior]&.to_s&.tr('_', ' ')
150
131
  options.delete_if { |key, _val| w3c?(key) }
151
132
  w3c_options
@@ -62,18 +62,6 @@ module Selenium
62
62
  end
63
63
  end
64
64
 
65
- def bitsize
66
- @bitsize ||= if defined?(FFI::Platform::ADDRESS_SIZE)
67
- FFI::Platform::ADDRESS_SIZE
68
- elsif defined?(FFI)
69
- FFI.type_size(:pointer) == 4 ? 32 : 64
70
- elsif jruby?
71
- Integer(ENV_JAVA['sun.arch.data.model'])
72
- else
73
- 1.size == 4 ? 32 : 64
74
- end
75
- end
76
-
77
65
  def jruby?
78
66
  engine == :jruby
79
67
  end
@@ -158,43 +146,6 @@ module Selenium
158
146
  at_exit { yield if Process.pid == pid }
159
147
  end
160
148
 
161
- def find_binary(*binary_names)
162
- paths = ENV['PATH'].split(File::PATH_SEPARATOR)
163
-
164
- if windows?
165
- binary_names.map! { |n| "#{n}.exe" }
166
- binary_names.dup.each { |n| binary_names << n.gsub('exe', 'bat') }
167
- end
168
-
169
- binary_names.each do |binary_name|
170
- paths.each do |path|
171
- full_path = File.join(path, binary_name)
172
- full_path = unix_path(full_path) if windows?
173
- exe = Dir.glob(full_path).find { |f| File.executable?(f) }
174
- return exe if exe
175
- end
176
- end
177
-
178
- nil
179
- end
180
-
181
- def find_in_program_files(*binary_names)
182
- paths = [
183
- ENV.fetch('PROGRAMFILES', '\\Program Files'),
184
- ENV.fetch('ProgramFiles(x86)', '\\Program Files (x86)'),
185
- ENV.fetch('ProgramW6432', '\\Program Files')
186
- ]
187
-
188
- paths.each do |root|
189
- binary_names.each do |name|
190
- exe = File.join(root, name)
191
- return exe if File.executable?(exe)
192
- end
193
- end
194
-
195
- nil
196
- end
197
-
198
149
  def localhost
199
150
  info = Socket.getaddrinfo 'localhost', 80, Socket::AF_INET, Socket::SOCK_STREAM
200
151
 
@@ -37,22 +37,26 @@ module Selenium
37
37
  # @param [Options] options browser options.
38
38
  # @return [String] the path to the correct driver.
39
39
  def driver_path(options)
40
- message = 'applicable driver not found; attempting to install with Selenium Manager (Beta)'
41
- WebDriver.logger.debug(message, id: :selenium_manager)
42
-
43
40
  command = generate_command(binary, options)
44
41
 
45
- location = run(*command)
46
- WebDriver.logger.debug("Driver found at #{location}", id: :selenium_manager)
47
- Platform.assert_executable location
42
+ output = run(*command)
43
+
44
+ browser_path = output['browser_path']
45
+ driver_path = output['driver_path']
46
+ Platform.assert_executable driver_path
47
+
48
+ if options.respond_to? :binary
49
+ options.binary = browser_path
50
+ options.browser_version = nil
51
+ end
48
52
 
49
- location
53
+ driver_path
50
54
  end
51
55
 
52
56
  private
53
57
 
54
58
  def generate_command(binary, options)
55
- command = [binary, '--browser', options.browser_name, '--output', 'json']
59
+ command = [binary, '--browser', options.browser_name]
56
60
  if options.browser_version
57
61
  command << '--browser-version'
58
62
  command << options.browser_version
@@ -65,7 +69,6 @@ module Selenium
65
69
  command << '--proxy'
66
70
  (command << options.proxy.ssl) || options.proxy.http
67
71
  end
68
- command << '--debug' if WebDriver.logger.debug?
69
72
  command
70
73
  end
71
74
 
@@ -98,12 +101,15 @@ module Selenium
98
101
  end
99
102
 
100
103
  def run(*command)
104
+ command += %w[--output json]
105
+ command << '--debug' if WebDriver.logger.debug?
106
+
101
107
  WebDriver.logger.debug("Executing Process #{command}", id: :selenium_manager)
102
108
 
103
109
  begin
104
110
  stdout, stderr, status = Open3.capture3(*command)
105
111
  json_output = stdout.empty? ? nil : JSON.parse(stdout)
106
- result = json_output&.dig('result', 'message')
112
+ result = json_output['result']
107
113
  rescue StandardError => e
108
114
  raise Error::WebDriverError, "Unsuccessful command executed: #{command}; #{e.message}"
109
115
  end
@@ -81,8 +81,7 @@ module Selenium
81
81
  else
82
82
  log
83
83
  end
84
-
85
- @args = args.is_a?(Hash) ? extract_service_args(args) : args
84
+ @args = args
86
85
 
87
86
  raise Error::WebDriverError, "invalid port: #{@port}" if @port < 1
88
87
  end
@@ -94,15 +93,6 @@ module Selenium
94
93
  def shutdown_supported
95
94
  self.class::SHUTDOWN_SUPPORTED
96
95
  end
97
-
98
- protected
99
-
100
- def extract_service_args(driver_opts)
101
- WebDriver.logger.deprecate('initializing Service class with :args using Hash',
102
- ':args parameter with an Array of String values',
103
- id: :driver_opts)
104
- driver_opts.key?(:args) ? driver_opts.delete(:args) : []
105
- end
106
96
  end # Service
107
97
  end # WebDriver
108
98
  end # Selenium
@@ -129,7 +129,7 @@ module Selenium
129
129
  Thread.current.report_on_exception = true
130
130
 
131
131
  yield params
132
- rescue *CONNECTION_ERRORS
132
+ rescue Error::WebDriverError, *CONNECTION_ERRORS
133
133
  Thread.stop
134
134
  end
135
135
  end
@@ -17,12 +17,10 @@
17
17
  # specific language governing permissions and limitations
18
18
  # under the License.
19
19
 
20
- require 'selenium/webdriver/chromium/service'
21
-
22
20
  module Selenium
23
21
  module WebDriver
24
22
  module Edge
25
- class Service < Chromium::Service
23
+ class Service < WebDriver::Service
26
24
  DEFAULT_PORT = 9515
27
25
  EXECUTABLE = 'msedgedriver'
28
26
  SHUTDOWN_SUPPORTED = true
@@ -99,21 +99,6 @@ module Selenium
99
99
  @options[:prefs][name] = value
100
100
  end
101
101
 
102
- #
103
- # Run Firefox in headless mode.
104
- #
105
- # @example Enable headless mode
106
- # options = Selenium::WebDriver::Firefox::Options.new
107
- # options.headless!
108
- #
109
-
110
- def headless!
111
- WebDriver.logger.deprecate('`Options#headless!`',
112
- "`Options#add_argument('-headless')`",
113
- id: :headless)
114
- add_argument '-headless'
115
- end
116
-
117
102
  #
118
103
  # Sets Firefox profile.
119
104
  #
@@ -24,18 +24,6 @@ module Selenium
24
24
  DEFAULT_PORT = 4444
25
25
  EXECUTABLE = 'geckodriver'
26
26
  SHUTDOWN_SUPPORTED = false
27
-
28
- private
29
-
30
- def extract_service_args(driver_opts)
31
- driver_args = super
32
- driver_opts = driver_opts.dup
33
- driver_args << "--binary=#{driver_opts[:binary]}" if driver_opts.key?(:binary)
34
- driver_args << "--log=#{driver_opts[:log]}" if driver_opts.key?(:log)
35
- driver_args << "--marionette-port=#{driver_opts[:marionette_port]}" if driver_opts.key?(:marionette_port)
36
- driver_args << "--host=#{driver_opts[:host]}" if driver_opts.key?(:host)
37
- driver_args
38
- end
39
27
  end # Service
40
28
  end # Firefox
41
29
  end # WebDriver
@@ -41,7 +41,8 @@ module Selenium
41
41
  use_per_process_proxy: 'ie.usePerProcessProxy',
42
42
  use_legacy_file_upload_dialog_handling: 'ie.useLegacyFileUploadDialogHandling',
43
43
  attach_to_edge_chrome: 'ie.edgechromium',
44
- edge_executable_path: 'ie.edgepath'
44
+ edge_executable_path: 'ie.edgepath',
45
+ ignore_process_match: 'ie.ignoreprocessmatch'
45
46
  }.freeze
46
47
  BROWSER = 'internet explorer'
47
48
 
@@ -24,22 +24,6 @@ module Selenium
24
24
  DEFAULT_PORT = 5555
25
25
  EXECUTABLE = 'IEDriverServer'
26
26
  SHUTDOWN_SUPPORTED = true
27
-
28
- private
29
-
30
- def extract_service_args(driver_opts)
31
- driver_args = super
32
- driver_opts = driver_opts.dup
33
- driver_args << "--log-level=#{driver_opts[:log_level].to_s.upcase}" if driver_opts.key?(:log_level)
34
- driver_args << "--log-file=#{driver_opts[:log_file]}" if driver_opts.key?(:log_file)
35
- if driver_opts.key?(:implementation)
36
- driver_args << "--implementation=#{driver_opts[:implementation].to_s.upcase}"
37
- end
38
- driver_args << "--host=#{driver_opts[:host]}" if driver_opts.key?(:host)
39
- driver_args << "--extract_path=#{driver_opts[:extract_path]}" if driver_opts.key?(:extract_path)
40
- driver_args << '--silent' if driver_opts[:silent] == true
41
- driver_args
42
- end
43
27
  end # Server
44
28
  end # IE
45
29
  end # WebDriver
@@ -53,83 +53,11 @@ module Selenium
53
53
  end
54
54
  end
55
55
 
56
- #
57
- # Backward compatibility
58
- #
59
-
60
- def version
61
- WebDriver.logger.deprecate('`Capabilities#version`', '`Capabilities#browser_version`', id: :jwp_caps)
62
- browser_version
63
- end
64
-
65
- def version=(value)
66
- WebDriver.logger.deprecate('`Capabilities#version=`', '`Capabilities#browser_version=`', id: :jwp_caps)
67
- self.browser_version = value
68
- end
69
-
70
- def platform
71
- WebDriver.logger.deprecate('`Capabilities#platform`', '`Capabilities#platform_name`', id: :jwp_caps)
72
- platform_name
73
- end
74
-
75
- def platform=(value)
76
- WebDriver.logger.deprecate('`Capabilities#platform=`', '`Capabilities#platform_name=`', id: :jwp_caps)
77
- self.platform_name = value
78
- end
79
-
80
56
  #
81
57
  # Convenience methods for the common choices.
82
58
  #
83
59
 
84
60
  class << self
85
- def chrome(opts = {})
86
- WebDriver.logger.deprecate('Remote::Capabilities.chrome', 'Options.chrome', id: :caps_browsers)
87
- new({
88
- browser_name: 'chrome'
89
- }.merge(opts))
90
- end
91
-
92
- def edge(opts = {})
93
- WebDriver.logger.deprecate('Remote::Capabilities.edge', 'Options.edge', id: :caps_browsers)
94
- new({
95
- browser_name: 'MicrosoftEdge'
96
- }.merge(opts))
97
- end
98
- alias microsoftedge edge
99
-
100
- def firefox(opts = {})
101
- WebDriver.logger.deprecate('Remote::Capabilities.firefox', 'Options.firefox', id: :caps_browsers)
102
- new({
103
- browser_name: 'firefox'
104
- }.merge(opts))
105
- end
106
- alias ff firefox
107
-
108
- def safari(opts = {})
109
- WebDriver.logger.deprecate('Remote::Capabilities.safari', 'Options.safari', id: :caps_browsers)
110
- new({
111
- browser_name: Selenium::WebDriver::Safari.technology_preview? ? 'Safari Technology Preview' : 'safari'
112
- }.merge(opts))
113
- end
114
-
115
- def htmlunit(opts = {})
116
- WebDriver.logger.deprecate('Remote::Capabilities.htmlunit',
117
- 'as argument in constructor',
118
- id: :caps_browsers)
119
- new({
120
- browser_name: 'htmlunit'
121
- }.merge(opts))
122
- end
123
-
124
- def internet_explorer(opts = {})
125
- WebDriver.logger.deprecate('Remote::Capabilities.ie', 'Options.ie', id: :caps_browsers)
126
- new({
127
- browser_name: 'internet explorer',
128
- platform_name: :windows
129
- }.merge(opts))
130
- end
131
- alias ie internet_explorer
132
-
133
61
  def always_match(capabilities)
134
62
  new(always_match: capabilities)
135
63
  end
@@ -16,8 +16,6 @@
16
16
  # KIND, either express or implied. See the License for the
17
17
  # specific language governing permissions and limitations
18
18
  # under the License.
19
-
20
- require 'net/https'
21
19
  require 'ipaddr'
22
20
 
23
21
  module Selenium
@@ -96,6 +94,7 @@ module Selenium
96
94
  end
97
95
 
98
96
  if response.is_a? Net::HTTPRedirection
97
+ WebDriver.logger.debug("Redirect to #{response['Location']}; times: #{redirects}")
99
98
  raise Error::WebDriverError, 'too many redirects' if redirects >= MAX_REDIRECTS
100
99
 
101
100
  request(:get, URI.parse(response['Location']), DEFAULT_HEADERS.dup, nil, redirects + 1)
@@ -25,7 +25,7 @@ module Selenium
25
25
  if response.is_a? String
26
26
  super(response)
27
27
  else
28
- super("status code #{response.code}")
28
+ super("status code #{response.code}; payload #{response.payload}")
29
29
  end
30
30
  end
31
31
  end # ServerError
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Selenium
21
21
  module WebDriver
22
- VERSION = '4.10.0'
22
+ VERSION = '4.11.0'
23
23
  end # WebDriver
24
24
  end # Selenium
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selenium-webdriver
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.10.0
4
+ version: 4.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rodionov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-06-07 00:00:00.000000000 Z
13
+ date: 2023-07-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rexml
@@ -242,7 +242,6 @@ files:
242
242
  - lib/selenium/webdriver/chromium/features.rb
243
243
  - lib/selenium/webdriver/chromium/options.rb
244
244
  - lib/selenium/webdriver/chromium/profile.rb
245
- - lib/selenium/webdriver/chromium/service.rb
246
245
  - lib/selenium/webdriver/common.rb
247
246
  - lib/selenium/webdriver/common/action_builder.rb
248
247
  - lib/selenium/webdriver/common/alert.rb
@@ -1,42 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Licensed to the Software Freedom Conservancy (SFC) under one
4
- # or more contributor license agreements. See the NOTICE file
5
- # distributed with this work for additional information
6
- # regarding copyright ownership. The SFC licenses this file
7
- # to you under the Apache License, Version 2.0 (the
8
- # "License"); you may not use this file except in compliance
9
- # with the License. You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing,
14
- # software distributed under the License is distributed on an
15
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- # KIND, either express or implied. See the License for the
17
- # specific language governing permissions and limitations
18
- # under the License.
19
-
20
- module Selenium
21
- module WebDriver
22
- module Chromium
23
- class Service < WebDriver::Service
24
- protected
25
-
26
- def extract_service_args(driver_opts)
27
- driver_args = super
28
- driver_opts = driver_opts.dup
29
- driver_args << "--log-path=#{driver_opts.delete(:log_path)}" if driver_opts.key?(:log_path)
30
- driver_args << "--url-base=#{driver_opts.delete(:url_base)}" if driver_opts.key?(:url_base)
31
- driver_args << "--port-server=#{driver_opts.delete(:port_server)}" if driver_opts.key?(:port_server)
32
- if driver_opts.key?(:whitelisted_ips)
33
- driver_args << "--whitelisted-ips=#{driver_opts.delete(:whitelisted_ips)}"
34
- end
35
- driver_args << '--verbose' if driver_opts.key?(:verbose)
36
- driver_args << '--silent' if driver_opts.key?(:silent)
37
- driver_args
38
- end
39
- end # Service
40
- end # Chromium
41
- end # WebDriver
42
- end # Selenium