eyes_selenium 3.18.2 → 4.0.2
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 +10 -10
- data/lib/applitools/selenium/browsers_info.rb +8 -0
- data/lib/applitools/selenium/concerns/selenium_eyes.rb +2 -6
- data/lib/applitools/selenium/configuration.rb +1 -1
- data/lib/applitools/selenium/css_transform/css_transform.rb +2 -2
- data/lib/applitools/selenium/devices.rb +115 -24
- data/lib/applitools/selenium/driver.rb +20 -0
- data/lib/applitools/selenium/eyes.rb +2 -2
- data/lib/applitools/selenium/scripts/process_page_and_poll.rb +3 -4
- data/lib/applitools/selenium/scripts/templates.rb +1 -0
- data/lib/applitools/selenium/selenium_eyes.rb +52 -48
- data/lib/applitools/selenium/target.rb +119 -124
- data/lib/applitools/selenium/visual_grid/chrome_emulation_info.rb +4 -0
- data/lib/applitools/selenium/visual_grid/desktop_browser_info.rb +6 -0
- data/lib/applitools/selenium/visual_grid/dom_snapshot_script.rb +197 -0
- data/lib/applitools/selenium/visual_grid/ios_device_info.rb +12 -0
- data/lib/applitools/selenium/visual_grid/ios_device_name.rb +8 -0
- data/lib/applitools/selenium/visual_grid/render_task.rb +21 -2
- data/lib/applitools/selenium/visual_grid/thread_pool.rb +2 -1
- data/lib/applitools/selenium/visual_grid/visual_grid_eyes.rb +122 -77
- data/lib/applitools/selenium/visual_grid/visual_grid_runner.rb +4 -0
- data/lib/applitools/version.rb +2 -1
- data/lib/eyes_selenium.rb +9 -0
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f69513a5b231f5f97262b25d01781df9f7b3741
|
4
|
+
data.tar.gz: 7826106e9c101ef46d60716d9c0f059fe76a27a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47c965e4d3dcec3a39bfca4147f3b2c1f552f86250ad44cd29d9187e0c4ce8fbabf02725aeb5a1a1473cff3d90604179cc4d4904bbc9fd28b32c8d981eb57437
|
7
|
+
data.tar.gz: 263307a7e11d0d28d6579411b904bd8b0dbf2fe372207071a285fb06a0db46a4b3d56160b9f2eaf51a7a39c1b031d62382b4c03e8958ac700a52a338bee77c35
|
@@ -12,21 +12,21 @@ module BrowserTypes
|
|
12
12
|
end
|
13
13
|
module BrowserType
|
14
14
|
extend self
|
15
|
-
CHROME = :'chrome
|
16
|
-
CHROME_ONE_VERSION_BACK = :'chrome-
|
17
|
-
CHROME_TWO_VERSIONS_BACK = :'chrome-
|
15
|
+
CHROME = :'chrome'
|
16
|
+
CHROME_ONE_VERSION_BACK = :'chrome-one-version-back'
|
17
|
+
CHROME_TWO_VERSIONS_BACK = :'chrome-two-versions-back'
|
18
18
|
|
19
|
-
FIREFOX = :'firefox
|
20
|
-
FIREFOX_ONE_VERSION_BACK = :'firefox-
|
21
|
-
FIREFOX_TWO_VERSIONS_BACK = :'firefox-
|
19
|
+
FIREFOX = :'firefox'
|
20
|
+
FIREFOX_ONE_VERSION_BACK = :'firefox-one-version-back'
|
21
|
+
FIREFOX_TWO_VERSIONS_BACK = :'firefox-two-versions-back'
|
22
22
|
|
23
|
-
SAFARI = :'safari
|
24
|
-
SAFARI_ONE_VERSION_BACK = :'safari-
|
25
|
-
SAFARI_TWO_VERSIONS_BACK = :'safari-
|
23
|
+
SAFARI = :'safari'
|
24
|
+
SAFARI_ONE_VERSION_BACK = :'safari-one-version-back'
|
25
|
+
SAFARI_TWO_VERSIONS_BACK = :'safari-two-versions-back'
|
26
26
|
IOS_SAFARI = :safari
|
27
27
|
|
28
28
|
EDGE_CHROMIUM = :'edgechromium'
|
29
|
-
EDGE_CHROMIUM_ONE_VERSION_BACK = :'edgechromium-
|
29
|
+
EDGE_CHROMIUM_ONE_VERSION_BACK = :'edgechromium-one-version-back'
|
30
30
|
|
31
31
|
IE_11 = :ie
|
32
32
|
EDGE_LEGACY = :edgelegacy
|
@@ -50,12 +50,8 @@ module Applitools
|
|
50
50
|
fully = args.select { |a| a.is_a?(TrueClass) || a.is_a?(FalseClass) }.first
|
51
51
|
target = Applitools::Selenium::Target.window.tap do |t|
|
52
52
|
t.timeout(match_timeout || USE_DEFAULT_MATCH_TIMEOUT)
|
53
|
-
if
|
54
|
-
|
55
|
-
else
|
56
|
-
t.fully(force_full_page_screenshot)
|
57
|
-
end
|
58
|
-
t.fully(fully) unless fully.nil?
|
53
|
+
# fully = force_full_page_screenshot if fully.nil?
|
54
|
+
t.fully(fully) if !fully.nil?
|
59
55
|
end
|
60
56
|
check(tag, target)
|
61
57
|
end
|
@@ -10,7 +10,7 @@ module Applitools
|
|
10
10
|
{
|
11
11
|
force_full_page_screenshot: false,
|
12
12
|
wait_before_screenshots: 0.1,
|
13
|
-
stitch_mode: Applitools::Selenium::StitchModes::CSS,
|
13
|
+
# stitch_mode: Applitools::Selenium::StitchModes::CSS,
|
14
14
|
hide_scrollbars: true,
|
15
15
|
hide_caret: false,
|
16
16
|
browsers_info: Applitools::Selenium::BrowsersInfo.new,
|
@@ -5,7 +5,7 @@ module Applitools
|
|
5
5
|
private
|
6
6
|
|
7
7
|
def get_position_from_transform(transform)
|
8
|
-
regexp = /^translate\(\s*(\-?)([\d, \.]+)px
|
8
|
+
regexp = /^translate\(\s*(\-?)([\d, \.]+)px(?:,\s*(\-?)([\d, \.]+)px)?\s*\)/
|
9
9
|
data = regexp.match(transform)
|
10
10
|
|
11
11
|
raise Applitools::EyesError.new "Can't parse CSS transition: #{transform}!" unless data
|
@@ -13,7 +13,7 @@ module Applitools
|
|
13
13
|
y = data[4].to_f.round
|
14
14
|
|
15
15
|
x *= -1 unless data[1].empty?
|
16
|
-
y *= -1 unless data[3].empty?
|
16
|
+
y *= -1 unless data[3].nil? || data[3].empty?
|
17
17
|
|
18
18
|
Applitools::Location.new(x, y)
|
19
19
|
end
|
@@ -1,45 +1,136 @@
|
|
1
1
|
# frozen_string_literal: false
|
2
2
|
module Devices
|
3
3
|
extend self
|
4
|
+
BlackberryPlayBook = 'Blackberry PlayBook'.freeze
|
5
|
+
BlackBerryZ30 = 'BlackBerry Z30'.freeze
|
6
|
+
GalaxyA5 = 'Galaxy A5'.freeze
|
7
|
+
GalaxyNote10 = 'Galaxy Note 10'.freeze
|
8
|
+
GalaxyNote10Plus = 'Galaxy Note 10 Plus'.freeze
|
9
|
+
GalaxyNote2 = 'Galaxy Note 2'.freeze
|
10
|
+
GalaxyNote3 = 'Galaxy Note 3'.freeze
|
11
|
+
GalaxyNote4 = 'Galaxy Note 4'.freeze
|
12
|
+
GalaxyNote8 = 'Galaxy Note 8'.freeze
|
13
|
+
GalaxyNote9 = 'Galaxy Note 9'.freeze
|
14
|
+
GalaxyS3 = 'Galaxy S3'.freeze
|
15
|
+
GalaxyS5 = 'Galaxy S5'.freeze
|
16
|
+
GalaxyS8 = 'Galaxy S8'.freeze
|
17
|
+
GalaxyS8Plus = 'Galaxy S8 Plus'.freeze
|
18
|
+
GalaxyS9 = 'Galaxy S9'.freeze
|
19
|
+
GalaxyS9Plus = 'Galaxy S9 Plus'.freeze
|
20
|
+
GalaxyS10 = 'Galaxy S10'.freeze
|
21
|
+
GalaxyS10Plus = 'Galaxy S10 Plus'.freeze
|
22
|
+
GalaxyS20 = 'Galaxy S20'.freeze
|
23
|
+
IPad = 'iPad'.freeze
|
24
|
+
IPad6thGen = 'iPad 6th Gen'.freeze
|
25
|
+
IPad7thGen = 'iPad 7th Gen'.freeze
|
26
|
+
IPadAir2 = 'iPad Air 2'.freeze
|
27
|
+
IPadMini = 'iPad Mini'.freeze
|
28
|
+
IPadPro = 'iPad Pro'.freeze
|
29
|
+
IPhone11 = 'iPhone 11'.freeze
|
30
|
+
IPhone11Pro = 'iPhone 11 Pro'.freeze
|
31
|
+
IPhone11ProMax = 'iPhone 11 Pro Max'.freeze
|
4
32
|
IPhone4 = 'iPhone 4'.freeze
|
5
33
|
IPhone5SE = 'iPhone 5/SE'.freeze
|
6
34
|
IPhone678 = 'iPhone 6/7/8'.freeze
|
7
35
|
IPhone678Plus = 'iPhone 6/7/8 Plus'.freeze
|
8
36
|
IPhoneX = 'iPhone X'.freeze
|
9
|
-
|
10
|
-
|
11
|
-
|
37
|
+
IPhoneXR = 'iPhone XR'.freeze
|
38
|
+
IPhoneXS = 'iPhone XS'.freeze
|
39
|
+
IPhoneXSMax = 'iPhone XS Max'.freeze
|
40
|
+
KindleFireHDX = 'Kindle Fire HDX'.freeze
|
41
|
+
LaptopWithHIDPIScreen = 'Laptop with HiDPI screen'.freeze
|
42
|
+
LaptopWithMDPIScreen = 'Laptop with MDPI screen'.freeze
|
43
|
+
LaptopWithTouch = 'Laptop with touch'.freeze
|
44
|
+
LGG6 = 'LG G6'.freeze
|
45
|
+
LGOptimusL70 = 'LG Optimus L70'.freeze
|
46
|
+
MicrosoftLumia550 = 'Microsoft Lumia 550'.freeze
|
47
|
+
MicrosoftLumia950 = 'Microsoft Lumia 950'.freeze
|
48
|
+
Nexus10 = 'Nexus 10'.freeze
|
12
49
|
Nexus4 = 'Nexus 4'.freeze
|
13
50
|
Nexus5 = 'Nexus 5'.freeze
|
14
51
|
Nexus5X = 'Nexus 5X'.freeze
|
15
52
|
Nexus6 = 'Nexus 6'.freeze
|
16
53
|
Nexus6P = 'Nexus 6P'.freeze
|
54
|
+
Nexus7 = 'Nexus 7'.freeze
|
55
|
+
|
56
|
+
NokiaLumia520 = 'Nokia Lumia 520'.freeze
|
57
|
+
NokiaN9 = 'Nokia N9'.freeze
|
58
|
+
OnePlus7T = 'OnePlus 7T'.freeze
|
59
|
+
OnePlus7TPro = 'OnePlus 7T Pro'.freeze
|
60
|
+
# OnePlus8 = 'OnePlus 8'.freeze
|
61
|
+
# OnePlus8Pro = 'OnePlus 8 Pro'.freeze
|
17
62
|
Pixel2 = 'Pixel 2'.freeze
|
18
63
|
Pixel2XL = 'Pixel 2 XL'.freeze
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
GalaxyS3 = 'Galaxy S III'.freeze
|
25
|
-
GalaxyS5 = 'Galaxy S5'.freeze
|
26
|
-
KindleFireHDX = 'Kindle Fire HDX'.freeze
|
27
|
-
IPadMini = 'iPad Mini'.freeze
|
28
|
-
BlackberryPlayBook = 'Blackberry PlayBook'.freeze
|
29
|
-
Nexus10 = 'Nexus 10'.freeze
|
30
|
-
Nexus7 = 'Nexus 7'.freeze
|
31
|
-
GalaxyNote3 = 'Galaxy Note 3'.freeze
|
32
|
-
GalaxyNote2 = 'Galaxy Note II'.freeze
|
33
|
-
LaptopWithTouch = 'Laptop with touch'.freeze
|
34
|
-
LaptopWithHDPIScreen = 'Laptop with HiDPI screen'.freeze
|
35
|
-
LaptopWithMDPIScreen = 'Laptop with MDPI screen'.freeze
|
64
|
+
Pixel3 = 'Pixel 3'.freeze
|
65
|
+
Pixel3XL = 'Pixel 3 XL'.freeze
|
66
|
+
Pixel4 = 'Pixel 4'.freeze
|
67
|
+
Pixel4XL = 'Pixel 4 XL'.freeze
|
68
|
+
Pixel5 = 'Pixel 5'.freeze
|
36
69
|
|
37
70
|
def enum_values
|
38
71
|
[
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
72
|
+
BlackberryPlayBook,
|
73
|
+
BlackBerryZ30,
|
74
|
+
GalaxyA5,
|
75
|
+
GalaxyNote10,
|
76
|
+
GalaxyNote10Plus,
|
77
|
+
GalaxyNote2,
|
78
|
+
GalaxyNote3,
|
79
|
+
GalaxyNote4,
|
80
|
+
GalaxyNote8,
|
81
|
+
GalaxyNote9,
|
82
|
+
GalaxyS3,
|
83
|
+
GalaxyS5,
|
84
|
+
GalaxyS8,
|
85
|
+
GalaxyS8Plus,
|
86
|
+
GalaxyS9,
|
87
|
+
GalaxyS9Plus,
|
88
|
+
GalaxyS10,
|
89
|
+
GalaxyS10Plus,
|
90
|
+
GalaxyS20,
|
91
|
+
IPad,
|
92
|
+
IPad6thGen,
|
93
|
+
IPad7thGen,
|
94
|
+
IPadAir2,
|
95
|
+
IPadMini,
|
96
|
+
IPadPro,
|
97
|
+
IPhone11,
|
98
|
+
IPhone11Pro,
|
99
|
+
IPhone11ProMax,
|
100
|
+
IPhone4,
|
101
|
+
IPhone5SE,
|
102
|
+
IPhone678,
|
103
|
+
IPhone678Plus,
|
104
|
+
IPhoneX,
|
105
|
+
IPhoneXR,
|
106
|
+
IPhoneXS,
|
107
|
+
IPhoneXSMax,
|
108
|
+
KindleFireHDX,
|
109
|
+
LaptopWithHIDPIScreen,
|
110
|
+
LaptopWithMDPIScreen,
|
111
|
+
LaptopWithTouch,
|
112
|
+
LGG6,
|
113
|
+
LGOptimusL70,
|
114
|
+
MicrosoftLumia550,
|
115
|
+
MicrosoftLumia950,
|
116
|
+
Nexus10,
|
117
|
+
Nexus4,
|
118
|
+
Nexus5,
|
119
|
+
Nexus5X,
|
120
|
+
Nexus6,
|
121
|
+
Nexus6P,
|
122
|
+
Nexus7,
|
123
|
+
NokiaLumia520,
|
124
|
+
NokiaN9,
|
125
|
+
OnePlus7T,
|
126
|
+
OnePlus7TPro,
|
127
|
+
Pixel2,
|
128
|
+
Pixel2XL,
|
129
|
+
Pixel3,
|
130
|
+
Pixel3XL,
|
131
|
+
Pixel4,
|
132
|
+
Pixel4XL,
|
133
|
+
Pixel5
|
43
134
|
]
|
44
135
|
end
|
45
136
|
end
|
@@ -227,6 +227,22 @@ module Applitools::Selenium
|
|
227
227
|
)
|
228
228
|
end
|
229
229
|
|
230
|
+
def universal_driver_config
|
231
|
+
if respond_to?(:session_id)
|
232
|
+
{
|
233
|
+
serverUrl: server_url,
|
234
|
+
sessionId: session_id,
|
235
|
+
capabilities: capabilities.as_json
|
236
|
+
}
|
237
|
+
else
|
238
|
+
{
|
239
|
+
serverUrl: server_url,
|
240
|
+
sessionId: bridge.session_id,
|
241
|
+
capabilities: capabilities.as_json
|
242
|
+
}
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
230
246
|
private
|
231
247
|
|
232
248
|
attr_reader :cached_default_content_viewport_size
|
@@ -245,6 +261,10 @@ module Applitools::Selenium
|
|
245
261
|
@driver ||= __getobj__
|
246
262
|
end
|
247
263
|
|
264
|
+
def server_url
|
265
|
+
bridge.http.send(:server_url).to_s
|
266
|
+
end
|
267
|
+
|
248
268
|
def extract_args(args)
|
249
269
|
case args.size
|
250
270
|
when 2
|
@@ -6,11 +6,11 @@ module Applitools
|
|
6
6
|
options = Applitools::Utils.extract_options!(args)
|
7
7
|
server_url = options.delete(:server_url)
|
8
8
|
server_url = args.first unless server_url
|
9
|
-
runner = options.delete(:visual_grid_runner) || options.delete(:runner)
|
9
|
+
runner = options.delete(:visual_grid_runner) || options.delete(:runner) || Applitools::ClassicRunner.new
|
10
10
|
if runner.is_a? Applitools::Selenium::VisualGridRunner
|
11
11
|
super Applitools::Selenium::VisualGridEyes.new(runner, server_url)
|
12
12
|
else
|
13
|
-
super Applitools::Selenium::SeleniumEyes.new(server_url, runner: runner
|
13
|
+
super Applitools::Selenium::SeleniumEyes.new(server_url, runner: runner)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|