selenium-webdriver 4.8.5 → 4.9.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: 88a2538aba27631f86ee74a7b8623687a9c78557fcd616bf45bf56def45c5c16
4
- data.tar.gz: 3c1c76ffa37595bcebb891c00256ca22bd05b15f102b1c09dc252ffdfdc30680
3
+ metadata.gz: f1ae360596be57c29db02808a7dae16c36062801e7639e83b366a54cdba5e3b2
4
+ data.tar.gz: f31169f7cfec055abb7a2f3595eee8e453acf316651a829af5f254a0f824cf9e
5
5
  SHA512:
6
- metadata.gz: 532aab442982dadef146df8e485ac4734ebed84a7a3ae47b34d7311b4f721016af8525c18c0bd706cf46522fd00c68bf3c91fe066832ee7a92a6d87da66d8df9
7
- data.tar.gz: f8eca6d0ae7ced9a458802d2ce6869b5b92dd73d0b9874cf1bcd9150525984c3bfac1cfabe1bee93bb6da0bd19688583617b52445302831d5f12fbb79c9c699f
6
+ metadata.gz: 675dad14a433939c81dabbb0276b1c5a97d95f0b1451ca48aa0e908c2cc0658f1d90e3970be4e3f62e65ff5eaef5cf391b5d646f50413ca46ea2f24de821fb5a
7
+ data.tar.gz: dd9d26b855e7b1f01f667d113181f6e7b35367ee74459b693a3c5872cc92a9e58f9d2d849de3aaff9738e3e77cb3f3117617219b4f76e2fda2f66bc75279ee8d
data/CHANGES CHANGED
@@ -1,9 +1,22 @@
1
+ 4.9.0 (2023-04-21)
2
+ =========================
3
+ Ruby:
4
+ * Fix devtools version fallback (#11869)
5
+ * Fix bug in selenium manager escaping back slashes in Windows (#11884)
6
+
7
+ BiDi:
8
+ * Released selenium-devtools 0.112.0 (supports CDP v85, v110, v111, v112)
9
+
10
+ 4.8.6 (2023-03-29)
11
+ =========================
12
+ Ruby:
13
+ * Properly escape arguments passed to Selenium Manager
14
+
1
15
  4.8.5 (2023-03-28)
2
16
  =========================
3
17
  Ruby:
4
18
  * Wrapping browser name in quotes when calling Selenium Manager
5
19
 
6
-
7
20
  4.8.4 (2023-03-28)
8
21
  =========================
9
22
  Ruby:
@@ -40,18 +40,18 @@ module Selenium
40
40
  raise ArgumentError, "SeleniumManager requires a WebDriver::Options instance, not #{options.inspect}"
41
41
  end
42
42
 
43
- command = [binary, '--browser', "'#{options.browser_name}'", '--output', 'json']
43
+ command = [binary, '--browser', options.browser_name, '--output', 'json']
44
44
  if options.browser_version
45
45
  command << '--browser-version'
46
46
  command << options.browser_version
47
47
  end
48
48
  if options.respond_to?(:binary) && !options.binary.nil?
49
49
  command << '--browser-path'
50
- command << "\"#{options.binary.gsub('\ ', ' ').gsub(' ', '\ ')}\""
50
+ command << options.binary.gsub('\\', '\\\\\\')
51
51
  end
52
52
  command << '--debug' if WebDriver.logger.debug?
53
53
 
54
- location = run(command.join(' '))
54
+ location = run(*command)
55
55
  WebDriver.logger.debug("Driver found at #{location}")
56
56
  Platform.assert_executable location
57
57
 
@@ -81,11 +81,11 @@ module Selenium
81
81
  end
82
82
  end
83
83
 
84
- def run(command)
84
+ def run(*command)
85
85
  WebDriver.logger.debug("Executing Process #{command}")
86
86
 
87
87
  begin
88
- stdout, stderr, status = Open3.capture3(command)
88
+ stdout, stderr, status = Open3.capture3(*command)
89
89
  json_output = stdout.empty? ? nil : JSON.parse(stdout)
90
90
  result = json_output&.dig('result', 'message')
91
91
  rescue StandardError => e
@@ -134,7 +134,7 @@ module Selenium
134
134
  request_id: request.id,
135
135
  url: request.url,
136
136
  method: request.method,
137
- post_data: request.post_data,
137
+ post_data: (Base64.strict_encode64(request.post_data) if request.post_data),
138
138
  headers: request.headers.map do |k, v|
139
139
  {name: k, value: v}
140
140
  end
@@ -52,7 +52,17 @@ module Selenium
52
52
  end
53
53
 
54
54
  def method_missing(method, *_args)
55
- desired_class = "Selenium::DevTools::V#{Selenium::DevTools.version}::#{method.capitalize}"
55
+ namespace = "Selenium::DevTools::V#{Selenium::DevTools.version}"
56
+ methods_to_classes = "#{namespace}::METHODS_TO_CLASSES"
57
+
58
+ desired_class = if Object.const_defined?(methods_to_classes)
59
+ # selenium-devtools 0.113 and newer
60
+ "#{namespace}::#{Object.const_get(methods_to_classes)[method]}"
61
+ else
62
+ # selenium-devtools 0.112 and older
63
+ "#{namespace}::#{method.capitalize}}"
64
+ end
65
+
56
66
  return unless Object.const_defined?(desired_class)
57
67
 
58
68
  self.class.class_eval do
@@ -45,8 +45,10 @@ module Selenium
45
45
  end
46
46
 
47
47
  def devtools_version
48
- capabilities['se:cdpVersion']&.split('.')&.first ||
49
- raise(Error::WebDriverError, 'DevTools is not supported by the Remote Server')
48
+ cdp_version = capabilities['se:cdpVersion']&.split('.')&.first
49
+ raise Error::WebDriverError, 'DevTools is not supported by the Remote Server' unless cdp_version
50
+
51
+ Integer(cdp_version)
50
52
  end
51
53
 
52
54
  def process_options(options, capabilities)
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Selenium
21
21
  module WebDriver
22
- VERSION = '4.8.5'
22
+ VERSION = '4.9.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.8.5
4
+ version: 4.9.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-03-28 00:00:00.000000000 Z
13
+ date: 2023-04-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rexml