eyes_selenium 3.18.4 → 4.0.3
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 +10 -1
- 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/full_page_capture_algorithm.rb +1 -1
- data/lib/applitools/selenium/scripts/process_page_and_poll.rb +3 -4
- data/lib/applitools/selenium/selenium_eyes.rb +52 -48
- data/lib/applitools/selenium/target.rb +131 -124
- data/lib/applitools/selenium/visual_grid/android_device_info.rb +65 -0
- data/lib/applitools/selenium/visual_grid/android_device_name.rb +45 -0
- 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/ios_device_info.rb +12 -0
- data/lib/applitools/selenium/visual_grid/ios_device_name.rb +13 -1
- data/lib/applitools/selenium/visual_grid/thread_pool.rb +2 -1
- data/lib/applitools/selenium/visual_grid/visual_grid_eyes.rb +103 -56
- data/lib/applitools/selenium/visual_grid/visual_grid_runner.rb +4 -0
- data/lib/applitools/version.rb +2 -1
- data/lib/eyes_selenium.rb +17 -0
- metadata +12 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b2a7dcddcd09ae5b7b893102cf1e70cca424498
|
4
|
+
data.tar.gz: ce17bba2d34abe0a51201aa363f0ff1bb1578bf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef39c99c0941c300005265d12b709b55c6494e40de4c0481e7d2944100265ece15acaee2c3eb97697b8890ab4e1cf9b74cb5b5c65510a5c5255279e259bf8779
|
7
|
+
data.tar.gz: 55c1689cfba6eb0f3cbe855c64c01691bf323eec3f62216021f8f7aeffbc3f92e73633977ab85e2cca11e97a04a750bb3a0f382df199a07bb8d0b83285077ccb
|
@@ -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,
|
@@ -26,6 +26,7 @@ module Applitools
|
|
26
26
|
|
27
27
|
boolean_field :force_full_page_screenshot
|
28
28
|
int_field :wait_before_screenshots
|
29
|
+
int_field :wait_before_capture
|
29
30
|
enum_field :stitch_mode, Applitools::Selenium::StitchModes.enum_values
|
30
31
|
boolean_field :hide_scrollbars
|
31
32
|
boolean_field :hide_caret
|
@@ -84,6 +85,14 @@ module Applitools
|
|
84
85
|
add_browser emu
|
85
86
|
end
|
86
87
|
|
88
|
+
def add_mobile_device(mobile_device_info)
|
89
|
+
add_mobile_devices(mobile_device_info)
|
90
|
+
end
|
91
|
+
|
92
|
+
def add_mobile_devices(mobile_device_infos)
|
93
|
+
add_browsers(mobile_device_infos)
|
94
|
+
end
|
95
|
+
|
87
96
|
def viewport_size
|
88
97
|
user_defined_vp = super
|
89
98
|
user_defined_vp = nil if user_defined_vp.respond_to?(:square) && user_defined_vp.square == 0
|
@@ -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
|
@@ -112,7 +112,7 @@ module Applitools::Selenium
|
|
112
112
|
|
113
113
|
logger.info "Creating stitchedImage container. Size: #{entire_size}"
|
114
114
|
|
115
|
-
stitched_image = ::ChunkyPNG::Image.new(entire_size.width, entire_size.height)
|
115
|
+
# stitched_image = ::ChunkyPNG::Image.new(entire_size.width, entire_size.height)
|
116
116
|
logger.info 'Done! Adding initial screenshot..'
|
117
117
|
logger.info "Initial part:(0,0) [#{image.width} x #{image.height}]"
|
118
118
|
|