selenium-webdriver 4.34.0 → 4.41.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.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +62 -6
  3. data/Gemfile +1 -1
  4. data/LICENSE +1 -1
  5. data/NOTICE +1 -1
  6. data/bin/linux/selenium-manager +0 -0
  7. data/bin/macos/selenium-manager +0 -0
  8. data/bin/windows/selenium-manager.exe +0 -0
  9. data/lib/selenium/server.rb +29 -4
  10. data/lib/selenium/webdriver/atoms/findElements.js +63 -49
  11. data/lib/selenium/webdriver/atoms/getAttribute.js +17 -6
  12. data/lib/selenium/webdriver/atoms/isDisplayed.js +34 -23
  13. data/lib/selenium/webdriver/bidi/browser.rb +71 -0
  14. data/lib/selenium/webdriver/bidi/browsing_context.rb +3 -2
  15. data/lib/selenium/webdriver/bidi/log_handler.rb +5 -0
  16. data/lib/selenium/webdriver/bidi/network/cookies.rb +13 -9
  17. data/lib/selenium/webdriver/bidi/network/credentials.rb +4 -0
  18. data/lib/selenium/webdriver/bidi/network/headers.rb +4 -0
  19. data/lib/selenium/webdriver/bidi/network/intercepted_auth.rb +4 -0
  20. data/lib/selenium/webdriver/bidi/network/intercepted_item.rb +4 -0
  21. data/lib/selenium/webdriver/bidi/network/intercepted_request.rb +20 -4
  22. data/lib/selenium/webdriver/bidi/network/intercepted_response.rb +24 -6
  23. data/lib/selenium/webdriver/bidi/network/url_pattern.rb +4 -0
  24. data/lib/selenium/webdriver/bidi/network.rb +18 -9
  25. data/lib/selenium/webdriver/bidi/session.rb +4 -0
  26. data/lib/selenium/webdriver/bidi.rb +1 -1
  27. data/lib/selenium/webdriver/chrome/driver.rb +3 -2
  28. data/lib/selenium/webdriver/chrome/service.rb +10 -0
  29. data/lib/selenium/webdriver/common/child_process.rb +2 -1
  30. data/lib/selenium/webdriver/common/driver.rb +0 -5
  31. data/lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb +7 -1
  32. data/lib/selenium/webdriver/common/driver_extensions/has_session_events.rb +48 -0
  33. data/lib/selenium/webdriver/common/error.rb +10 -3
  34. data/lib/selenium/webdriver/common/local_driver.rb +11 -1
  35. data/lib/selenium/webdriver/common/logger.rb +28 -0
  36. data/lib/selenium/webdriver/common/manager.rb +2 -0
  37. data/lib/selenium/webdriver/common/options.rb +20 -1
  38. data/lib/selenium/webdriver/common/platform.rb +1 -3
  39. data/lib/selenium/webdriver/common/service.rb +6 -0
  40. data/lib/selenium/webdriver/common/service_manager.rb +36 -4
  41. data/lib/selenium/webdriver/common/socket_poller.rb +1 -1
  42. data/lib/selenium/webdriver/common/wait.rb +5 -2
  43. data/lib/selenium/webdriver/common/websocket_connection.rb +73 -37
  44. data/lib/selenium/webdriver/common/zipper.rb +12 -2
  45. data/lib/selenium/webdriver/common.rb +1 -0
  46. data/lib/selenium/webdriver/devtools.rb +1 -1
  47. data/lib/selenium/webdriver/edge/driver.rb +3 -2
  48. data/lib/selenium/webdriver/edge/service.rb +11 -0
  49. data/lib/selenium/webdriver/firefox/driver.rb +3 -2
  50. data/lib/selenium/webdriver/firefox/service.rb +21 -2
  51. data/lib/selenium/webdriver/ie/driver.rb +3 -2
  52. data/lib/selenium/webdriver/ie/service.rb +10 -0
  53. data/lib/selenium/webdriver/remote/bidi_bridge.rb +4 -2
  54. data/lib/selenium/webdriver/remote/bridge.rb +12 -4
  55. data/lib/selenium/webdriver/remote/driver.rb +1 -0
  56. data/lib/selenium/webdriver/remote/features.rb +26 -1
  57. data/lib/selenium/webdriver/remote/http/common.rb +32 -0
  58. data/lib/selenium/webdriver/safari/driver.rb +3 -2
  59. data/lib/selenium/webdriver/support/block_event_listener.rb +5 -1
  60. data/lib/selenium/webdriver/support/color.rb +14 -14
  61. data/lib/selenium/webdriver/support/event_firing_bridge.rb +5 -1
  62. data/lib/selenium/webdriver/version.rb +1 -1
  63. data/lib/selenium/webdriver.rb +7 -2
  64. data/selenium-webdriver.gemspec +1 -1
  65. metadata +6 -10
  66. data/lib/selenium/webdriver/bidi/log/base_log_entry.rb +0 -35
  67. data/lib/selenium/webdriver/bidi/log/console_log_entry.rb +0 -35
  68. data/lib/selenium/webdriver/bidi/log/filter_by.rb +0 -40
  69. data/lib/selenium/webdriver/bidi/log/generic_log_entry.rb +0 -33
  70. data/lib/selenium/webdriver/bidi/log/javascript_log_entry.rb +0 -33
  71. data/lib/selenium/webdriver/bidi/log_inspector.rb +0 -147
@@ -32,8 +32,9 @@ module Selenium
32
32
  include LocalDriver
33
33
 
34
34
  def initialize(options: nil, service: nil, url: nil, **)
35
- caps, url = initialize_local_driver(options, service, url)
36
- super(caps: caps, url: url, **)
35
+ initialize_local_driver(options, service, url) do |caps, driver_url|
36
+ super(caps: caps, url: driver_url, **)
37
+ end
37
38
  end
38
39
 
39
40
  def browser
@@ -25,6 +25,16 @@ module Selenium
25
25
  EXECUTABLE = 'IEDriverServer'
26
26
  SHUTDOWN_SUPPORTED = true
27
27
  DRIVER_PATH_ENV_KEY = 'SE_IEDRIVER'
28
+
29
+ def initialize(args: nil, **)
30
+ if ENV.key?('SE_DEBUG')
31
+ args = Array(args.dup)
32
+ warn_driver_log_override if args.reject! { |arg| arg.include?('log-level') || arg.include?('silent') }
33
+ args << '--log-level=DEBUG'
34
+ end
35
+
36
+ super
37
+ end
28
38
  end # Server
29
39
  end # IE
30
40
  end # WebDriver
@@ -46,9 +46,11 @@ module Selenium
46
46
  end
47
47
 
48
48
  def quit
49
- super
50
- ensure
51
49
  bidi.close
50
+ rescue *QUIT_ERRORS
51
+ nil
52
+ ensure
53
+ super
52
54
  end
53
55
 
54
56
  def close
@@ -206,12 +206,20 @@ module Selenium
206
206
  switch_to_frame nil
207
207
  end
208
208
 
209
- QUIT_ERRORS = [IOError].freeze
209
+ QUIT_ERRORS = [IOError, EOFError, WebSocket::Error].freeze
210
210
 
211
211
  def quit
212
- execute :delete_session
213
- http.close
214
- rescue *QUIT_ERRORS
212
+ begin
213
+ execute :delete_session
214
+ rescue *QUIT_ERRORS => e
215
+ WebDriver.logger.debug "delete_session failed during quit: #{e.class}: #{e.message}", id: :quit
216
+ ensure
217
+ begin
218
+ http.close
219
+ rescue *QUIT_ERRORS => e
220
+ WebDriver.logger.debug "http.close failed during quit: #{e.class}: #{e.message}", id: :quit
221
+ end
222
+ end
215
223
  nil
216
224
  end
217
225
 
@@ -29,6 +29,7 @@ module Selenium
29
29
  include DriverExtensions::UploadsFiles
30
30
  include DriverExtensions::HasSessionId
31
31
  include DriverExtensions::HasFileDownloads
32
+ include DriverExtensions::HasSessionEvents
32
33
 
33
34
  def initialize(capabilities: nil, options: nil, service: nil, url: nil, **)
34
35
  raise ArgumentError, "Can not set :service object on #{self.class}" if service
@@ -25,7 +25,8 @@ module Selenium
25
25
  upload_file: [:post, 'session/:session_id/se/file'],
26
26
  get_downloadable_files: [:get, 'session/:session_id/se/files'],
27
27
  download_file: [:post, 'session/:session_id/se/files'],
28
- delete_downloadable_files: [:delete, 'session/:session_id/se/files']
28
+ delete_downloadable_files: [:delete, 'session/:session_id/se/files'],
29
+ fire_session_event: [:post, 'session/:session_id/se/event']
29
30
  }.freeze
30
31
 
31
32
  def add_commands(commands)
@@ -69,6 +70,30 @@ module Selenium
69
70
  def delete_downloadable_files
70
71
  execute :delete_downloadable_files
71
72
  end
73
+
74
+ #
75
+ # Fires a custom session event to the remote server event bus.
76
+ # This allows test code to trigger server-side utilities that subscribe to
77
+ # the event bus.
78
+ #
79
+ # @param [String] event_type The type of event (e.g., "test:failed", "log:collect")
80
+ # @param [Hash] payload Optional data to include with the event
81
+ # @return [Hash] Response data including success status, event type, and timestamp
82
+ #
83
+ # @example Fire a simple event
84
+ # driver.fire_session_event("test:started")
85
+ #
86
+ # @example Fire an event with payload
87
+ # driver.fire_session_event("test:failed", {
88
+ # testName: "LoginTest",
89
+ # error: "Element not found"
90
+ # })
91
+ #
92
+ def fire_session_event(event_type, payload = nil)
93
+ params = {eventType: event_type}
94
+ params[:payload] = payload if payload
95
+ execute :fire_session_event, {}, params
96
+ end
72
97
  end
73
98
  end # Remote
74
99
  end # WebDriver
@@ -28,6 +28,7 @@ module Selenium
28
28
  'Accept' => CONTENT_TYPE,
29
29
  'Content-Type' => "#{CONTENT_TYPE}; charset=UTF-8"
30
30
  }.freeze
31
+ BINARY_ENCODINGS = [Encoding::BINARY, Encoding::ASCII_8BIT].freeze
31
32
 
32
33
  class << self
33
34
  attr_accessor :extra_headers
@@ -55,6 +56,7 @@ module Selenium
55
56
  headers['Cache-Control'] = 'no-cache' if verb == :get
56
57
 
57
58
  if command_hash
59
+ command_hash = ensure_utf8_encoding(command_hash)
58
60
  payload = JSON.generate(command_hash)
59
61
  headers['Content-Length'] = payload.bytesize.to_s if %i[post put].include?(verb)
60
62
 
@@ -91,6 +93,36 @@ module Selenium
91
93
  raise NotImplementedError, 'subclass responsibility'
92
94
  end
93
95
 
96
+ def ensure_utf8_encoding(obj)
97
+ case obj
98
+ when String
99
+ encode_string_to_utf8(obj)
100
+ when Array
101
+ obj.map { |item| ensure_utf8_encoding(item) }
102
+ when Hash
103
+ obj.each_with_object({}) do |(key, value), result|
104
+ result[ensure_utf8_encoding(key)] = ensure_utf8_encoding(value)
105
+ end
106
+ else
107
+ obj
108
+ end
109
+ end
110
+
111
+ def encode_string_to_utf8(str)
112
+ return str if str.encoding == Encoding::UTF_8 && str.valid_encoding?
113
+
114
+ if BINARY_ENCODINGS.include?(str.encoding)
115
+ result = str.dup.force_encoding(Encoding::UTF_8)
116
+ return result if result.valid_encoding?
117
+ end
118
+
119
+ str.encode(Encoding::UTF_8)
120
+ rescue EncodingError => e
121
+ raise Error::WebDriverError,
122
+ "Unable to encode string to UTF-8: #{e.message}. " \
123
+ "String encoding: #{str.encoding}, content: #{str.inspect}"
124
+ end
125
+
94
126
  def create_response(code, body, content_type)
95
127
  code = code.to_i
96
128
  body = body.to_s.strip
@@ -32,8 +32,9 @@ module Selenium
32
32
  include LocalDriver
33
33
 
34
34
  def initialize(options: nil, service: nil, url: nil, **)
35
- caps, url = initialize_local_driver(options, service, url)
36
- super(caps: caps, url: url, **)
35
+ initialize_local_driver(options, service, url) do |caps, driver_url|
36
+ super(caps: caps, url: driver_url, **)
37
+ end
37
38
  end
38
39
 
39
40
  def browser
@@ -25,9 +25,13 @@ module Selenium
25
25
  @callback = callback
26
26
  end
27
27
 
28
- def method_missing(meth, *) # rubocop:disable Style/MissingRespondToMissing
28
+ def method_missing(meth, *)
29
29
  @callback.call(meth, *)
30
30
  end
31
+
32
+ def respond_to_missing?(_meth, _include_private = false)
33
+ true
34
+ end
31
35
  end # BlockEventListener
32
36
  end # Support
33
37
  end # WebDriver
@@ -72,26 +72,26 @@ module Selenium
72
72
  end
73
73
  end
74
74
 
75
- def self.from_hsl(h, s, l, a) # rubocop:disable Naming/MethodParameterName
76
- h = Float(h) / 360
77
- s = Float(s) / 100
78
- l = Float(l) / 100
79
- a = Float(a || 1)
80
-
81
- if s.zero?
82
- r = l
75
+ def self.from_hsl(hue, sat, light, alpha)
76
+ hue = Float(hue) / 360
77
+ sat = Float(sat) / 100
78
+ light = Float(light) / 100
79
+ alpha = Float(alpha || 1)
80
+
81
+ if sat.zero?
82
+ r = light
83
83
  g = r
84
84
  b = r
85
85
  else
86
- luminocity2 = l < 0.5 ? l * (s + 1) : l + s - (l * s)
87
- luminocity1 = (l * 2) - luminocity2
86
+ luminocity2 = light < 0.5 ? light * (sat + 1) : light + sat - (light * sat)
87
+ luminocity1 = (light * 2) - luminocity2
88
88
 
89
- r = hue_to_rgb(luminocity1, luminocity2, h + (1.0 / 3.0))
90
- g = hue_to_rgb(luminocity1, luminocity2, h)
91
- b = hue_to_rgb(luminocity1, luminocity2, h - (1.0 / 3.0))
89
+ r = hue_to_rgb(luminocity1, luminocity2, hue + (1.0 / 3.0))
90
+ g = hue_to_rgb(luminocity1, luminocity2, hue)
91
+ b = hue_to_rgb(luminocity1, luminocity2, hue - (1.0 / 3.0))
92
92
  end
93
93
 
94
- new (r * 255).round, (g * 255).round, (b * 255).round, a
94
+ new (r * 255).round, (g * 255).round, (b * 255).round, alpha
95
95
  end
96
96
 
97
97
  def self.hue_to_rgb(lum1, lum2, hue)
@@ -120,9 +120,13 @@ module Selenium
120
120
  returned
121
121
  end
122
122
 
123
- def method_missing(meth, ...) # rubocop:disable Style/MissingRespondToMissing
123
+ def method_missing(meth, ...)
124
124
  @delegate.__send__(meth, ...)
125
125
  end
126
+
127
+ def respond_to_missing?(meth, include_private = false)
128
+ @delegate.respond_to?(meth, include_private) || super
129
+ end
126
130
  end # EventFiringBridge
127
131
  end # Support
128
132
  end # WebDriver
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Selenium
21
21
  module WebDriver
22
- VERSION = '4.34.0'
22
+ VERSION = '4.41.0'
23
23
  end # WebDriver
24
24
  end # Selenium
@@ -95,8 +95,13 @@ module Selenium
95
95
  #
96
96
 
97
97
  def self.logger(**)
98
- level = $DEBUG || ENV.key?('DEBUG') ? :debug : :info
99
- @logger ||= WebDriver::Logger.new('Selenium', default_level: level, **)
98
+ level = $DEBUG || ENV.key?('DEBUG') || ENV.key?('SE_DEBUG') ? :debug : :info
99
+ @logger ||= WebDriver::Logger.new('Selenium', default_level: level, **).tap do |logger|
100
+ if ENV.key?('SE_DEBUG')
101
+ logger.debug!
102
+ logger.stderr!
103
+ end
104
+ end
100
105
  end
101
106
  end # WebDriver
102
107
  end # Selenium
@@ -52,7 +52,7 @@ Gem::Specification.new do |s|
52
52
  s.add_dependency 'base64', ['~> 0.2']
53
53
  s.add_dependency 'logger', ['~> 1.4']
54
54
  s.add_dependency 'rexml', ['~> 3.2', '>= 3.2.5']
55
- s.add_dependency 'rubyzip', ['>= 1.2.2', '< 3.0']
55
+ s.add_dependency 'rubyzip', ['>= 1.2.2', '< 4.0']
56
56
  s.add_dependency 'websocket', ['~> 1.0']
57
57
 
58
58
  s.add_development_dependency 'git', ['~> 1.19']
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.34.0
4
+ version: 4.41.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: 2025-06-29 00:00:00.000000000 Z
13
+ date: 2026-02-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: base64
@@ -69,7 +69,7 @@ dependencies:
69
69
  version: 1.2.2
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
- version: '3.0'
72
+ version: '4.0'
73
73
  type: :runtime
74
74
  prerelease: false
75
75
  version_requirements: !ruby/object:Gem::Requirement
@@ -79,7 +79,7 @@ dependencies:
79
79
  version: 1.2.2
80
80
  - - "<"
81
81
  - !ruby/object:Gem::Version
82
- version: '3.0'
82
+ version: '4.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: websocket
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -283,14 +283,9 @@ files:
283
283
  - lib/selenium/webdriver/atoms/isDisplayed.js
284
284
  - lib/selenium/webdriver/atoms/mutationListener.js
285
285
  - lib/selenium/webdriver/bidi.rb
286
+ - lib/selenium/webdriver/bidi/browser.rb
286
287
  - lib/selenium/webdriver/bidi/browsing_context.rb
287
- - lib/selenium/webdriver/bidi/log/base_log_entry.rb
288
- - lib/selenium/webdriver/bidi/log/console_log_entry.rb
289
- - lib/selenium/webdriver/bidi/log/filter_by.rb
290
- - lib/selenium/webdriver/bidi/log/generic_log_entry.rb
291
- - lib/selenium/webdriver/bidi/log/javascript_log_entry.rb
292
288
  - lib/selenium/webdriver/bidi/log_handler.rb
293
- - lib/selenium/webdriver/bidi/log_inspector.rb
294
289
  - lib/selenium/webdriver/bidi/network.rb
295
290
  - lib/selenium/webdriver/bidi/network/cookies.rb
296
291
  - lib/selenium/webdriver/bidi/network/credentials.rb
@@ -338,6 +333,7 @@ files:
338
333
  - lib/selenium/webdriver/common/driver_extensions/has_network_interception.rb
339
334
  - lib/selenium/webdriver/common/driver_extensions/has_permissions.rb
340
335
  - lib/selenium/webdriver/common/driver_extensions/has_pinned_scripts.rb
336
+ - lib/selenium/webdriver/common/driver_extensions/has_session_events.rb
341
337
  - lib/selenium/webdriver/common/driver_extensions/has_session_id.rb
342
338
  - lib/selenium/webdriver/common/driver_extensions/prints_page.rb
343
339
  - lib/selenium/webdriver/common/driver_extensions/uploads_files.rb
@@ -1,35 +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
- class BiDi
23
- class BaseLogEntry
24
- attr_accessor :level, :text, :timestamp, :stack_trace
25
-
26
- def initialize(level:, text:, timestamp:, stack_trace:)
27
- @level = level
28
- @text = text
29
- @timestamp = timestamp
30
- @stack_trace = stack_trace
31
- end
32
- end # BaseLogEntry
33
- end # BiDi
34
- end # WebDriver
35
- end # Selenium
@@ -1,35 +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
- class BiDi
23
- class ConsoleLogEntry < GenericLogEntry
24
- attr_accessor :method, :realm, :args
25
-
26
- def initialize(method:, realm:, args:, **)
27
- super(**)
28
- @method = method
29
- @realm = realm
30
- @args = args
31
- end
32
- end # ConsoleLogEntry
33
- end # BiDi
34
- end # WebDriver
35
- end # Selenium
@@ -1,40 +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
- class BiDi
23
- class FilterBy
24
- attr_accessor :level
25
-
26
- def initialize(level)
27
- @level = level
28
- end
29
-
30
- def self.log_level(level = nil)
31
- unless %w[debug error info warning].include?(level)
32
- raise Error::WebDriverError,
33
- "Valid log levels are 'debug', 'error', 'info' and 'warning'. Received: #{level}"
34
- end
35
- FilterBy.new(level)
36
- end
37
- end # FilterBy
38
- end # BiDi
39
- end # WebDriver
40
- end # Selenium
@@ -1,33 +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
- class BiDi
23
- class GenericLogEntry < BaseLogEntry
24
- attr_accessor :type
25
-
26
- def initialize(level:, text:, timestamp:, type:, stack_trace:)
27
- super(level: level, text: text, timestamp: timestamp, stack_trace: stack_trace)
28
- @type = type
29
- end
30
- end # GenericLogEntry
31
- end # BiDi
32
- end # WebDriver
33
- end # Selenium
@@ -1,33 +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
- class BiDi
23
- class JavascriptLogEntry < GenericLogEntry
24
- attr_accessor :type
25
-
26
- def initialize(level:, text:, timestamp:, type:, stack_trace:)
27
- super
28
- @type = 'javascript'
29
- end
30
- end # JavascriptLogEntry
31
- end # BiDi
32
- end # WebDriver
33
- end # Selenium