selenium-webdriver 4.4.0 → 4.5.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: 2be9fb14d69ce82170e3ddbe0cbcf2f2428e1978544d8a7c11191ebd37cf0241
4
- data.tar.gz: 2e40d6ad67ccfb269ee1ae9d3f47d024e90081da9881f757f22170751875fa69
3
+ metadata.gz: d753308296c6105d6bdbe84f0bbff8f61064fcf44c40694fbe9c4d8758ff7d21
4
+ data.tar.gz: 6b277eedd4f26e9baf17b95a7034b7940f4c41c041ba646edda4247c7edaf57c
5
5
  SHA512:
6
- metadata.gz: b7f419d9b1349a1afbf68999eecaa53391503cc793026228577fbcb40ac4958a35c539286f7c4c3c913992336dc797481f7c57f6aec9d58813671e24d1cd09ad
7
- data.tar.gz: '0093bd2d0fbb0c1c8e7abee9d1a632f80d458b1dc0d1b22635f403230ed7c40a2be498915d8abed40bd4992295a1444a69c3e653ebf1d4cf106886c8a9d5a499'
6
+ metadata.gz: 42dbe1ef868e3be3fddac2add30d0b8bf17a6ae2febff15a6e3d0ce79c3f46122d9e3616a1e1e8e370744e008c4c06ad531b382410753ab6daa3d147c66a8552
7
+ data.tar.gz: 8e841646f3a38364c55fb5020e0eb30a9076f3fb5ace99e42175f9f07d1634c59ad52dcf84d01530fbc43282d5e7b48fc9058edc905d0eac10cf98babb2ed029
data/CHANGES CHANGED
@@ -1,4 +1,24 @@
1
- 4.4.0 (Unreleased)
1
+ 4.5.0 (Unreleased)
2
+ =========================
3
+
4
+ BiDi:
5
+ * Released selenium-devtools 0.105.0 (supports CDP v85, v103, v104, v105)
6
+ * Released selenium-devtools 0.106.0 (supports CDP v85, v104, v105, v106)
7
+ * Add HasBiDi support to Chrome
8
+
9
+ Ruby:
10
+ * Fix bug in Platform code
11
+ * Update Select class to error when elements are disabled (#10812)
12
+
13
+ Firefox:
14
+ * Add support for installing unsigned add-ons (#10265, thanks TamsilAmani!)
15
+ * Change accept_insecure_certificates to true by default (to match other bindings)
16
+ * Set debugger_address option to true by default
17
+
18
+ Server:
19
+ * Add support for initializing server class with arguments and log level
20
+
21
+ 4.4.0 (2022-08-09)
2
22
  =========================
3
23
 
4
24
  BiDi:
@@ -182,15 +182,21 @@ module Selenium
182
182
  def initialize(jar, opts = {})
183
183
  raise Errno::ENOENT, jar unless File.exist?(jar)
184
184
 
185
- @jar = jar
186
- @host = '127.0.0.1'
187
- @role = opts.fetch(:role, 'standalone')
188
- @port = opts.fetch(:port, 4444)
189
- @timeout = opts.fetch(:timeout, 30)
185
+ @jar = jar
186
+ @host = '127.0.0.1'
187
+ @role = opts.fetch(:role, 'standalone')
188
+ @port = opts.fetch(:port, 4444)
189
+ @timeout = opts.fetch(:timeout, 30)
190
190
  @background = opts.fetch(:background, false)
191
- @log = opts[:log]
192
- @log_file = nil
193
- @additional_args = []
191
+ @additional_args = opts.fetch(:args, [])
192
+ @log = opts[:log]
193
+ if opts[:log_level]
194
+ @log ||= true
195
+ @additional_args << '--log-level'
196
+ @additional_args << opts[:log_level].to_s
197
+ end
198
+
199
+ @log_file = nil
194
200
  end
195
201
 
196
202
  def start
@@ -28,6 +28,7 @@ module Selenium
28
28
 
29
29
  class Driver < WebDriver::Driver
30
30
  EXTENSIONS = [DriverExtensions::HasCDP,
31
+ DriverExtensions::HasBiDi,
31
32
  DriverExtensions::HasCasting,
32
33
  DriverExtensions::HasNetworkConditions,
33
34
  DriverExtensions::HasNetworkInterception,
@@ -101,7 +101,7 @@ module Selenium
101
101
  # if it exists. If it does not, then the value of the attribute with the given name is returned.
102
102
  # If neither exists, null is returned.
103
103
  #
104
- # The "style" attribute is converted as best can be to a text representation with a trailing semi-colon.
104
+ # The "style" attribute is converted as best can be to a text representation with a trailing semicolon.
105
105
  #
106
106
  # The following are deemed to be "boolean" attributes, and will return either "true" or "false":
107
107
  #
@@ -105,7 +105,6 @@ module Selenium
105
105
 
106
106
  def cygwin?
107
107
  RUBY_PLATFORM.include?('cygwin')
108
- !Regexp.last_match.nil?
109
108
  end
110
109
 
111
110
  def null_device
@@ -35,7 +35,11 @@ module Selenium
35
35
  end
36
36
 
37
37
  def install_addon(path, temporary)
38
- addon = File.open(path, 'rb') { |crx_file| Base64.strict_encode64 crx_file.read }
38
+ addon = if File.directory?(path)
39
+ Zipper.zip(path)
40
+ else
41
+ File.open(path, 'rb') { |crx_file| Base64.strict_encode64 crx_file.read }
42
+ end
39
43
 
40
44
  payload = {addon: addon}
41
45
  payload[:temporary] = temporary unless temporary.nil?
@@ -57,7 +57,8 @@ module Selenium
57
57
  #
58
58
 
59
59
  def initialize(log_level: nil, **opts)
60
- @debugger_address = opts.delete(:debugger_address)
60
+ @debugger_address = opts.delete(:debugger_address) { true }
61
+ opts[:accept_insecure_certs] = true unless opts.key?(:accept_insecure_certs)
61
62
 
62
63
  super(**opts)
63
64
 
@@ -26,8 +26,11 @@ module Selenium
26
26
  #
27
27
 
28
28
  def initialize(element)
29
- tag_name = element.tag_name
29
+ unless element.enabled?
30
+ raise Error::UnsupportedOperationError, 'Select element is disabled and may not be used.'
31
+ end
30
32
 
33
+ tag_name = element.tag_name
31
34
  raise ArgumentError, "unexpected tag name #{tag_name.inspect}" unless tag_name.casecmp('select').zero?
32
35
 
33
36
  @element = element
@@ -215,6 +218,8 @@ module Selenium
215
218
  end
216
219
 
217
220
  def select_option(option)
221
+ raise Error::UnsupportedOperationError, 'You may not select a disabled option' unless option.enabled?
222
+
218
223
  option.click unless option.selected?
219
224
  end
220
225
 
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Selenium
21
21
  module WebDriver
22
- VERSION = '4.4.0'
22
+ VERSION = '4.5.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.4.0
4
+ version: 4.5.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: 2022-08-09 00:00:00.000000000 Z
13
+ date: 2022-09-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: childprocess
@@ -445,7 +445,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
445
445
  - !ruby/object:Gem::Version
446
446
  version: 1.3.1
447
447
  requirements: []
448
- rubygems_version: 3.0.3.1
448
+ rubygems_version: 3.0.3
449
449
  signing_key:
450
450
  specification_version: 4
451
451
  summary: Selenium is a browser automation tool for automated testing of webapps and