eyes_selenium 4.1.1 → 4.1.4.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/applitools/selenium/browser_types.rb +2 -0
- data/lib/applitools/selenium/devices.rb +15 -1
- data/lib/applitools/selenium/target.rb +45 -19
- data/lib/applitools/version.rb +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1177bcfea1f8608bf2d1ef43870ee8c49cd99d14a10d1da052d2857c388feb8
|
4
|
+
data.tar.gz: 5f9b880d6baffa75405a4c308716f3c13dd4e14333e6bae2900e9bf4a05dbc80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69a8d4db2a89e00ac34837c4811391f51a25bf3c3bcc658fcd625cf893961ccc023948731e6771495985ef8a836c603c7d4a9d558d1613a36468cb8322ac38da
|
7
|
+
data.tar.gz: 745acafc2115630852055bb5f381f02e6b19792bb8b461cab0e428c5e1cba7b400bed5c182f7cb92673e02820308c36083aff7038a4f5bd7b7ba1f33d85105c7
|
@@ -27,6 +27,7 @@ module BrowserType
|
|
27
27
|
|
28
28
|
EDGE_CHROMIUM = :'edgechromium'
|
29
29
|
EDGE_CHROMIUM_ONE_VERSION_BACK = :'edgechromium-one-version-back'
|
30
|
+
EDGE_CHROMIUM_TWO_VERSIONS_BACK = :'edgechromium-two-versions-back'
|
30
31
|
|
31
32
|
IE_11 = :ie
|
32
33
|
EDGE_LEGACY = :edgelegacy
|
@@ -65,6 +66,7 @@ module BrowserType
|
|
65
66
|
IE_10,
|
66
67
|
EDGE_CHROMIUM,
|
67
68
|
EDGE_CHROMIUM_ONE_VERSION_BACK,
|
69
|
+
EDGE_CHROMIUM_TWO_VERSIONS_BACK,
|
68
70
|
IOS_SAFARI
|
69
71
|
]
|
70
72
|
end
|
@@ -66,6 +66,13 @@ module Devices
|
|
66
66
|
Pixel4 = 'Pixel 4'.freeze
|
67
67
|
Pixel4XL = 'Pixel 4 XL'.freeze
|
68
68
|
Pixel5 = 'Pixel 5'.freeze
|
69
|
+
Pixel6 = 'Pixel 6'.freeze
|
70
|
+
XiaomiRedmiNote11 = 'Xiaomi Redmi Note 11'.freeze
|
71
|
+
XiaomiRedmiNote11Pro = 'Xiaomi Redmi Note 11 Pro'.freeze
|
72
|
+
GalaxyS22 = 'Galaxy S22'.freeze
|
73
|
+
GalaxyS22Plus = 'Galaxy S22 Plus'.freeze
|
74
|
+
GalaxyTabS7 = 'Galaxy Tab S7'.freeze
|
75
|
+
GalaxyTabS8 = 'Galaxy Tab S8'.freeze
|
69
76
|
|
70
77
|
def enum_values
|
71
78
|
[
|
@@ -130,7 +137,14 @@ module Devices
|
|
130
137
|
Pixel3XL,
|
131
138
|
Pixel4,
|
132
139
|
Pixel4XL,
|
133
|
-
Pixel5
|
140
|
+
Pixel5,
|
141
|
+
Pixel6,
|
142
|
+
XiaomiRedmiNote11,
|
143
|
+
XiaomiRedmiNote11Pro,
|
144
|
+
GalaxyS22,
|
145
|
+
GalaxyS22Plus,
|
146
|
+
GalaxyTabS7,
|
147
|
+
GalaxyTabS8
|
134
148
|
]
|
135
149
|
end
|
136
150
|
end
|
@@ -49,10 +49,8 @@ module Applitools
|
|
49
49
|
if args.empty?
|
50
50
|
reset_ignore
|
51
51
|
else
|
52
|
-
|
53
|
-
|
54
|
-
value = value[:selector] if value.is_a?(Hash) && (value[:type].to_s === 'id')
|
55
|
-
ignored_regions << value
|
52
|
+
region = region_from_args(args)
|
53
|
+
ignored_regions << region if region
|
56
54
|
end
|
57
55
|
self
|
58
56
|
end
|
@@ -81,33 +79,36 @@ module Applitools
|
|
81
79
|
# @!parse def floating(region_or_element, bounds, left,top, right, bottom, padding); end;
|
82
80
|
|
83
81
|
def floating(*args)
|
84
|
-
|
82
|
+
options = Applitools::Utils.extract_options!(args)
|
83
|
+
padding = options && options[:padding]
|
84
|
+
requested_padding = get_requested_padding(padding, args)
|
85
|
+
bounds = get_bounds(args)
|
85
86
|
value = convert_to_universal(args)
|
86
87
|
value = { type: args[0], selector: args[1] } if value.nil?
|
87
88
|
value = value[:selector] if value.is_a?(Hash) && (value[:type].to_s === 'id')
|
88
|
-
|
89
|
-
|
89
|
+
region = { region: value }
|
90
|
+
region.merge!(bounds) if bounds != {}
|
91
|
+
region.merge!(padding: requested_padding) if requested_padding != {}
|
92
|
+
region.merge!(regionId: options[:region_id]) if options[:region_id]
|
93
|
+
floating_regions << region
|
90
94
|
self
|
91
95
|
end
|
92
96
|
|
93
97
|
def layout(*args)
|
94
|
-
|
95
|
-
region
|
96
|
-
layout_regions << region
|
98
|
+
region = region_from_args(args)
|
99
|
+
layout_regions << region if region
|
97
100
|
self
|
98
101
|
end
|
99
102
|
|
100
103
|
def content(*args)
|
101
|
-
|
102
|
-
region
|
103
|
-
content_regions << region
|
104
|
+
region = region_from_args(args)
|
105
|
+
content_regions << region if region
|
104
106
|
self
|
105
107
|
end
|
106
108
|
|
107
109
|
def strict(*args)
|
108
|
-
|
109
|
-
region
|
110
|
-
strict_regions << region
|
110
|
+
region = region_from_args(args)
|
111
|
+
strict_regions << region if region
|
111
112
|
self
|
112
113
|
end
|
113
114
|
|
@@ -400,16 +401,41 @@ module Applitools
|
|
400
401
|
driver.find_element(:xpath, xpath)
|
401
402
|
end
|
402
403
|
|
403
|
-
def get_requested_padding(args)
|
404
|
+
def get_requested_padding(padding, args)
|
405
|
+
return padding.to_hash if padding && padding.is_a?(Applitools::PaddingBounds)
|
406
|
+
return padding if padding && (padding.is_a?(Hash) || padding.is_a?(Numeric))
|
404
407
|
if args.last.is_a? Applitools::PaddingBounds
|
405
408
|
args.pop
|
406
|
-
elsif args.last.is_a?(Applitools::FloatingBounds)
|
407
|
-
|
409
|
+
# elsif args.last.is_a?(Applitools::FloatingBounds)
|
410
|
+
# args.pop.to_hash
|
408
411
|
else
|
409
412
|
{}
|
410
413
|
end
|
411
414
|
end
|
412
415
|
|
416
|
+
def get_bounds(args)
|
417
|
+
return args.pop.to_hash if args.last.is_a?(Applitools::FloatingBounds)
|
418
|
+
last4 = args.last(4)
|
419
|
+
if last4.size === 4 && last4.all? { |e| e.is_a?(Numeric) }
|
420
|
+
FloatingBounds.new(*last4).to_hash
|
421
|
+
else
|
422
|
+
{}
|
423
|
+
end
|
424
|
+
end
|
425
|
+
|
426
|
+
def region_from_args(args)
|
427
|
+
options = Applitools::Utils.extract_options!(args)
|
428
|
+
padding = options && options[:padding]
|
429
|
+
requested_padding = get_requested_padding(padding, args)
|
430
|
+
value = convert_to_universal(args)
|
431
|
+
value = { type: args[0], selector: args[1] } if value.nil?
|
432
|
+
value = value[:selector] if value.is_a?(Hash) && (value[:type].to_s === 'id')
|
433
|
+
return nil if value === {selector: nil, type: nil}
|
434
|
+
region = { region: value }
|
435
|
+
region.merge!(padding: requested_padding) if requested_padding != {}
|
436
|
+
region.merge!(regionId: options[:region_id]) if options[:region_id]
|
437
|
+
region
|
438
|
+
end
|
413
439
|
|
414
440
|
|
415
441
|
def is_element?(el)
|
data/lib/applitools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eyes_selenium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.4.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Applitools Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eyes_core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.1.
|
19
|
+
version: 4.1.4.beta
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.1.
|
26
|
+
version: 4.1.4.beta
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: selenium-webdriver
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,9 +178,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
178
178
|
version: '0'
|
179
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
180
|
requirements:
|
181
|
-
- - "
|
181
|
+
- - ">"
|
182
182
|
- !ruby/object:Gem::Version
|
183
|
-
version:
|
183
|
+
version: 1.3.1
|
184
184
|
requirements: []
|
185
185
|
rubygems_version: 3.3.14
|
186
186
|
signing_key:
|