capybara 3.39.1 → 3.39.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +7 -0
- data/lib/capybara/selenium/driver_specializations/firefox_driver.rb +1 -1
- data/lib/capybara/selenium/node.rb +4 -4
- data/lib/capybara/selenium/patches/action_pauser.rb +1 -1
- data/lib/capybara/version.rb +1 -1
- data/spec/selenium_spec_chrome_remote.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0945d8fedaab75fa31a90d12105de7318d78c20a46955a1b78ae88dc791f6a5a'
|
4
|
+
data.tar.gz: 9a59ca68ff9d44ef28597603ed275ebef28c79c8b6fb76ffdc26daaee68ab383
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbb58a338e2408140ce5e6a44bc141fc44833952c10f611996f5a217c9a0ad00f8d6344a1c16b0bf53000801f9e1d45ef3848cb0fa886dabe68c6d766a42372a
|
7
|
+
data.tar.gz: db985c0c947ff348c80008fd4c90232a0ad4dcd38dbe8694b157ecfb512c099d6e9bc08177d8a115e1db17cca35c68903e10662da0fdd14c4f1a2ab671932b16
|
data/History.md
CHANGED
@@ -10,7 +10,7 @@ module Capybara::Selenium::Driver::FirefoxDriver
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.w3c?(driver)
|
13
|
-
(defined?(Selenium::WebDriver::VERSION) && (Selenium::WebDriver::VERSION
|
13
|
+
(defined?(Selenium::WebDriver::VERSION) && (Gem::Version.new(Selenium::WebDriver::VERSION) >= Gem::Version.new('4'))) ||
|
14
14
|
driver.browser.capabilities.is_a?(::Selenium::WebDriver::Remote::W3C::Capabilities)
|
15
15
|
end
|
16
16
|
end
|
@@ -416,14 +416,14 @@ private
|
|
416
416
|
actions = browser_action.tap do |acts|
|
417
417
|
if click_options.coords?
|
418
418
|
if click_options.center_offset?
|
419
|
-
if Selenium::WebDriver::VERSION
|
419
|
+
if Gem::Version.new(Selenium::WebDriver::VERSION) >= Gem::Version.new('4.3')
|
420
420
|
acts.move_to(native, *click_options.coords)
|
421
421
|
else
|
422
422
|
::Selenium::WebDriver.logger.suppress_deprecations do
|
423
423
|
acts.move_to(native).move_by(*click_options.coords)
|
424
424
|
end
|
425
425
|
end
|
426
|
-
elsif Selenium::WebDriver::VERSION
|
426
|
+
elsif Gem::Version.new(Selenium::WebDriver::VERSION) >= Gem::Version.new('4.3')
|
427
427
|
right_by, down_by = *click_options.coords
|
428
428
|
size = native.size
|
429
429
|
left_offset = (size[:width] / 2).to_i
|
@@ -476,13 +476,13 @@ private
|
|
476
476
|
end
|
477
477
|
|
478
478
|
def w3c?
|
479
|
-
(defined?(Selenium::WebDriver::VERSION) && (Selenium::WebDriver::VERSION
|
479
|
+
(defined?(Selenium::WebDriver::VERSION) && (Gem::Version.new(Selenium::WebDriver::VERSION) >= Gem::Version.new('4'))) ||
|
480
480
|
capabilities.is_a?(::Selenium::WebDriver::Remote::W3C::Capabilities)
|
481
481
|
end
|
482
482
|
|
483
483
|
def action_pause(action, duration)
|
484
484
|
if w3c?
|
485
|
-
if Selenium::WebDriver::VERSION
|
485
|
+
if Gem::Version.new(Selenium::WebDriver::VERSION) >= Gem::Version.new('4.2')
|
486
486
|
action.pause(device: action.pointer_inputs.first, duration: duration)
|
487
487
|
else
|
488
488
|
action.pause(action.pointer_inputs.first, duration)
|
@@ -20,7 +20,7 @@ module ActionPauser
|
|
20
20
|
private_constant :Pauser
|
21
21
|
end
|
22
22
|
|
23
|
-
if defined?(Selenium::WebDriver::VERSION) && (Selenium::WebDriver::VERSION
|
23
|
+
if defined?(Selenium::WebDriver::VERSION) && (Gem::Version.new(Selenium::WebDriver::VERSION) < Gem::Version.new('4')) &&
|
24
24
|
defined?(Selenium::WebDriver::ActionBuilder)
|
25
25
|
Selenium::WebDriver::ActionBuilder.prepend(ActionPauser)
|
26
26
|
end
|
data/lib/capybara/version.rb
CHANGED
@@ -32,7 +32,7 @@ def ensure_selenium_running!
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def selenium_gte?(version)
|
35
|
-
defined?(Selenium::WebDriver::VERSION) && (Selenium::WebDriver::VERSION
|
35
|
+
defined?(Selenium::WebDriver::VERSION) && (Gem::Version.new(Selenium::WebDriver::VERSION) >= Gem::Version.new(version))
|
36
36
|
end
|
37
37
|
|
38
38
|
Capybara.register_driver :selenium_chrome_remote do |app|
|
data/spec/spec_helper.rb
CHANGED
@@ -16,7 +16,7 @@ module Capybara
|
|
16
16
|
module SpecHelper
|
17
17
|
def firefox?(session)
|
18
18
|
browser_name(session) == :firefox &&
|
19
|
-
((defined?(::Selenium::WebDriver::VERSION) && (::Selenium::WebDriver::VERSION
|
19
|
+
((defined?(::Selenium::WebDriver::VERSION) && (Gem::Version.new(::Selenium::WebDriver::VERSION) >= Gem::Version.new('4'))) ||
|
20
20
|
session.driver.browser.capabilities.is_a?(::Selenium::WebDriver::Remote::W3C::Capabilities))
|
21
21
|
end
|
22
22
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.39.
|
4
|
+
version: 3.39.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Walpole
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-06-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: addressable
|