eyes_selenium 3.18.4 → 6.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +1713 -0
- data/Rakefile +86 -0
- data/eyes_selenium.gemspec +33 -0
- data/lib/applitools/eyes_selenium/version.rb +8 -0
- data/lib/applitools/selenium/browser_types.rb +14 -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 +13 -4
- data/lib/applitools/selenium/device_name_generated.rb +207 -0
- data/lib/applitools/selenium/devices.rb +106 -40
- data/lib/applitools/selenium/driver.rb +21 -1
- data/lib/applitools/selenium/eyes.rb +2 -2
- data/lib/applitools/selenium/full_page_capture_algorithm.rb +1 -1
- data/lib/applitools/selenium/selenium_eyes.rb +61 -49
- data/lib/applitools/selenium/target.rb +259 -162
- 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 +2 -1
- data/lib/applitools/selenium/visual_grid/ios_device_info.rb +12 -0
- data/lib/applitools/selenium/visual_grid/ios_device_name.rb +3 -35
- data/lib/applitools/selenium/visual_grid/ios_device_name_generated.rb +93 -0
- data/lib/applitools/selenium/visual_grid/running_test.rb +1 -1
- data/lib/applitools/selenium/visual_grid/thread_pool.rb +2 -1
- data/lib/applitools/selenium/visual_grid/vg_resource.rb +7 -6
- data/lib/applitools/selenium/visual_grid/visual_grid_eyes.rb +139 -55
- data/lib/applitools/selenium/visual_grid/visual_grid_runner.rb +6 -2
- data/lib/eyes_selenium.rb +23 -2
- metadata +14 -26
- data/lib/applitools/selenium/scripts/process_page_and_poll.rb +0 -17
- data/lib/applitools/selenium/scripts/templates.rb +0 -34
- data/lib/applitools/version.rb +0 -5
data/Rakefile
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rake/clean'
|
4
|
+
require 'securerandom'
|
5
|
+
|
6
|
+
require 'bundler/gem_helper'
|
7
|
+
# Monkey patch the Bundler release class to change tags for eyes_images
|
8
|
+
module Bundler
|
9
|
+
class GemHelper
|
10
|
+
|
11
|
+
def version_tag
|
12
|
+
ruby_tag = "@applitools/ruby"
|
13
|
+
"#{ruby_tag}/#{gemspec.name}@#{version}"
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
Bundler::GemHelper.install_tasks
|
20
|
+
|
21
|
+
namespace 'github' do
|
22
|
+
task :set_batch_info do
|
23
|
+
batch_id = SecureRandom.uuid
|
24
|
+
# next if ENV['APPLITOOLS_BATCH_ID'] && !ENV['APPLITOOLS_BATCH_ID'].empty?
|
25
|
+
ENV['APPLITOOLS_DONT_CLOSE_BATCHES'] = 'true'
|
26
|
+
ENV['APPLITOOLS_BATCH_ID'] = batch_id unless ENV['APPLITOOLS_BATCH_ID'] && !ENV['APPLITOOLS_BATCH_ID'].empty?
|
27
|
+
ENV['APPLITOOLS_BATCH_NAME'] = "Eyes Ruby SDK(#{RUBY_VERSION} | #{RUBY_PLATFORM})"
|
28
|
+
end
|
29
|
+
|
30
|
+
task :check do
|
31
|
+
puts "Batch ID: #{ENV['APPLITOOLS_BATCH_ID']}"
|
32
|
+
puts "Batch NAME: #{ENV['APPLITOOLS_BATCH_NAME']}"
|
33
|
+
end
|
34
|
+
|
35
|
+
# require 'rspec/core/rake_task'
|
36
|
+
# namespace :unit_tests do
|
37
|
+
# RSpec::Core::RakeTask.new(:core) do |t|
|
38
|
+
# t.pattern = 'spec/core'
|
39
|
+
# end
|
40
|
+
#
|
41
|
+
# RSpec::Core::RakeTask.new(:visual_grid) do |t|
|
42
|
+
# t.pattern = 'spec/visual_grid'
|
43
|
+
# end
|
44
|
+
#
|
45
|
+
# RSpec::Core::RakeTask.new(:selenium) do |t|
|
46
|
+
# t.pattern = 'spec/selenium'
|
47
|
+
# end
|
48
|
+
#
|
49
|
+
# RSpec::Core::RakeTask.new(:regression) do |t|
|
50
|
+
# t.pattern = 'spec/regression'
|
51
|
+
# end
|
52
|
+
#
|
53
|
+
# RSpec::Core::RakeTask.new(:bugfix) do |t|
|
54
|
+
# t.pattern = 'spec/bugfix'
|
55
|
+
# end
|
56
|
+
#
|
57
|
+
# RSpec::Core::RakeTask.new(:calabash) do |t|
|
58
|
+
# t.pattern = 'spec/calabash'
|
59
|
+
# end
|
60
|
+
#
|
61
|
+
# RSpec::Core::RakeTask.new(:images) do |t|
|
62
|
+
# t.pattern = 'spec/images'
|
63
|
+
# end
|
64
|
+
#
|
65
|
+
# task :github => [:regression, :bugfix, :core, :selenium, :visual_grid, :calabash, :images]
|
66
|
+
# end
|
67
|
+
#
|
68
|
+
# task :unit_tests => [:set_batch_info, :check, 'unit_tests:github']
|
69
|
+
#
|
70
|
+
# task :vg_tests => [:set_batch_info, :check] do
|
71
|
+
# sh('bundle exec parallel_rspec -n 1 -- --tag visual_grid -- spec/integration/*_spec.rb')
|
72
|
+
# end
|
73
|
+
|
74
|
+
# task :travis_selenium => ['webdrivers:chromedriver:update', :set_batch_info, :check] do
|
75
|
+
# sh('bundle exec parallel_rspec -n 4 -- --tag selenium -- spec/integration/*_spec.rb')
|
76
|
+
# end
|
77
|
+
#
|
78
|
+
# task :travis_vg => ['webdrivers:chromedriver:update', :set_batch_info, :check] do
|
79
|
+
# sh('bundle exec parallel_rspec -n 1 -- --tag visual_grid -- spec/integration/*_spec.rb')
|
80
|
+
# end
|
81
|
+
|
82
|
+
# task :vg_tests => ['webdrivers:chromedriver:update', :set_batch_info, :check] do
|
83
|
+
# sh('bundle exec parallel_rspec -n 1 -- --tag visual_grid -- spec/integration/*_spec.rb')
|
84
|
+
# end
|
85
|
+
|
86
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
|
6
|
+
require 'applitools/eyes_selenium/version'
|
7
|
+
|
8
|
+
Gem::Specification.new do |spec|
|
9
|
+
spec.name = 'eyes_selenium'
|
10
|
+
spec.version = Applitools::EyesSelenium::VERSION
|
11
|
+
spec.authors = ['Applitools Team']
|
12
|
+
spec.email = ['team@applitools.com']
|
13
|
+
spec.description = 'Provides SDK for writing Applitools Selenium-based tests'
|
14
|
+
spec.summary = 'Applitools Ruby Selenium SDK'
|
15
|
+
spec.homepage = 'https://www.applitools.com'
|
16
|
+
spec.license = 'Applitools'
|
17
|
+
|
18
|
+
spec.files = `git ls-files lib/applitools/selenium`.split($RS) + [
|
19
|
+
'lib/eyes_selenium.rb',
|
20
|
+
'lib/applitools/eyes_selenium/version.rb',
|
21
|
+
'CHANGELOG.md',
|
22
|
+
'eyes_selenium.gemspec',
|
23
|
+
'Rakefile',
|
24
|
+
]
|
25
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
26
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
27
|
+
spec.require_paths = %w(lib)
|
28
|
+
spec.add_dependency 'eyes_core', "= 6.7.0"
|
29
|
+
spec.add_dependency 'selenium-webdriver', '>= 3'
|
30
|
+
spec.add_dependency 'css_parser'
|
31
|
+
spec.add_dependency 'crass'
|
32
|
+
spec.add_dependency 'state_machines'
|
33
|
+
end
|
@@ -12,21 +12,23 @@ 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
|
+
SAFARI_EARLY_ACCESS = :'safari-earlyaccess'
|
26
27
|
IOS_SAFARI = :safari
|
27
28
|
|
28
29
|
EDGE_CHROMIUM = :'edgechromium'
|
29
|
-
EDGE_CHROMIUM_ONE_VERSION_BACK = :'edgechromium-
|
30
|
+
EDGE_CHROMIUM_ONE_VERSION_BACK = :'edgechromium-one-version-back'
|
31
|
+
EDGE_CHROMIUM_TWO_VERSIONS_BACK = :'edgechromium-two-versions-back'
|
30
32
|
|
31
33
|
IE_11 = :ie
|
32
34
|
EDGE_LEGACY = :edgelegacy
|
@@ -60,11 +62,13 @@ module BrowserType
|
|
60
62
|
SAFARI,
|
61
63
|
SAFARI_ONE_VERSION_BACK,
|
62
64
|
SAFARI_TWO_VERSIONS_BACK,
|
65
|
+
SAFARI_EARLY_ACCESS,
|
63
66
|
IE_11,
|
64
67
|
EDGE_LEGACY,
|
65
68
|
IE_10,
|
66
69
|
EDGE_CHROMIUM,
|
67
70
|
EDGE_CHROMIUM_ONE_VERSION_BACK,
|
71
|
+
EDGE_CHROMIUM_TWO_VERSIONS_BACK,
|
68
72
|
IOS_SAFARI
|
69
73
|
]
|
70
74
|
end
|
@@ -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
|
@@ -8,9 +8,9 @@ module Applitools
|
|
8
8
|
class Configuration < Applitools::EyesBaseConfiguration
|
9
9
|
DEFAULT_CONFIG = proc do
|
10
10
|
{
|
11
|
-
force_full_page_screenshot: false,
|
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,12 +85,20 @@ 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
|
90
99
|
return user_defined_vp if user_defined_vp
|
91
|
-
from_browsers_info = browsers_info.select { |bi| bi.viewport_size.square > 0 }.first
|
92
|
-
return from_browsers_info.viewport_size if from_browsers_info
|
100
|
+
# from_browsers_info = browsers_info.select { |bi| bi.viewport_size.square > 0 }.first
|
101
|
+
# return from_browsers_info.viewport_size if from_browsers_info
|
93
102
|
nil
|
94
103
|
end
|
95
104
|
|
@@ -0,0 +1,207 @@
|
|
1
|
+
# GENERATED FILE #
|
2
|
+
|
3
|
+
module DeviceNameGenerated
|
4
|
+
extend self
|
5
|
+
IPhone_4 = 'iPhone 4'.freeze
|
6
|
+
IPhone_5SE = 'iPhone 5/SE'.freeze
|
7
|
+
|
8
|
+
# Deprecated: Use DeviceName::IPhone_5SE instead.
|
9
|
+
# deprecate_constant :IPhone_5S_E not allow to point to new version (
|
10
|
+
IPhone_5S_E = 'iPhone 5/SE'.freeze
|
11
|
+
IPhone_SE_3rd_Gen = 'iPhone SE 3rd Gen'.freeze
|
12
|
+
IPhone_6_7_8 = 'iPhone 6/7/8'.freeze
|
13
|
+
IPhone_6_7_8_Plus = 'iPhone 6/7/8 Plus'.freeze
|
14
|
+
IPhone_X = 'iPhone X'.freeze
|
15
|
+
IPhone_13_Mini = 'iPhone 13 Mini'.freeze
|
16
|
+
IPhone_14_Plus = 'iPhone 14 Plus'.freeze
|
17
|
+
IPhone_14_Pro = 'iPhone 14 Pro'.freeze
|
18
|
+
IPhone_15_Pro = 'iPhone 15 Pro'.freeze
|
19
|
+
BlackBerry_Z30 = 'BlackBerry Z30'.freeze
|
20
|
+
Nexus_4 = 'Nexus 4'.freeze
|
21
|
+
Nexus_5 = 'Nexus 5'.freeze
|
22
|
+
Nexus_5X = 'Nexus 5X'.freeze
|
23
|
+
Nexus_6 = 'Nexus 6'.freeze
|
24
|
+
Nexus_6P = 'Nexus 6P'.freeze
|
25
|
+
Pixel_2 = 'Pixel 2'.freeze
|
26
|
+
Pixel_2_XL = 'Pixel 2 XL'.freeze
|
27
|
+
LG_Optimus_L70 = 'LG Optimus L70'.freeze
|
28
|
+
Nokia_N9 = 'Nokia N9'.freeze
|
29
|
+
Nokia_Lumia_520 = 'Nokia Lumia 520'.freeze
|
30
|
+
Microsoft_Lumia_550 = 'Microsoft Lumia 550'.freeze
|
31
|
+
Microsoft_Lumia_950 = 'Microsoft Lumia 950'.freeze
|
32
|
+
Galaxy_S3 = 'Galaxy S3'.freeze
|
33
|
+
Galaxy_S_III = 'Galaxy S III'.freeze
|
34
|
+
Galaxy_S5 = 'Galaxy S5'.freeze
|
35
|
+
Kindle_Fire_HDX = 'Kindle Fire HDX'.freeze
|
36
|
+
IPad_Mini = 'iPad Mini'.freeze
|
37
|
+
IPad = 'iPad'.freeze
|
38
|
+
IPad_Pro = 'iPad Pro'.freeze
|
39
|
+
IPad_8th_Gen = 'iPad 8th Gen'.freeze
|
40
|
+
IPad_10th_Gen = 'iPad 10th Gen'.freeze
|
41
|
+
IPad_Mini_4th_Gen = 'iPad Mini 4th Gen'.freeze
|
42
|
+
IPad_Mini_6th_Gen = 'iPad Mini 6th Gen'.freeze
|
43
|
+
Blackberry_PlayBook = 'Blackberry PlayBook'.freeze
|
44
|
+
Nexus_10 = 'Nexus 10'.freeze
|
45
|
+
Nexus_7 = 'Nexus 7'.freeze
|
46
|
+
Galaxy_Note_3 = 'Galaxy Note 3'.freeze
|
47
|
+
Galaxy_Note_II = 'Galaxy Note II'.freeze
|
48
|
+
Galaxy_Note_2 = 'Galaxy Note 2'.freeze
|
49
|
+
Galaxy_S20 = 'Galaxy S20'.freeze
|
50
|
+
Galaxy_S22 = 'Galaxy S22'.freeze
|
51
|
+
Galaxy_S21 = 'Galaxy S21'.freeze
|
52
|
+
Galaxy_S21_Ultra = 'Galaxy S21 Ultra'.freeze
|
53
|
+
Galaxy_S22_Ultra = 'Galaxy S22 Ultra'.freeze
|
54
|
+
Laptop_with_touch = 'Laptop with touch'.freeze
|
55
|
+
Laptop_with_HiDPI_screen = 'Laptop with HiDPI screen'.freeze
|
56
|
+
Laptop_with_MDPI_screen = 'Laptop with MDPI screen'.freeze
|
57
|
+
IPhone_XR = 'iPhone XR'.freeze
|
58
|
+
IPhone_XS_Max = 'iPhone XS Max'.freeze
|
59
|
+
IPhone_XS = 'iPhone XS'.freeze
|
60
|
+
Samsung_Galaxy_A5 = 'Samsung Galaxy A5'.freeze
|
61
|
+
Galaxy_A5 = 'Galaxy A5'.freeze
|
62
|
+
Samsung_Galaxy_S8 = 'Samsung Galaxy S8'.freeze
|
63
|
+
Galaxy_S8 = 'Galaxy S8'.freeze
|
64
|
+
LG_G6 = 'LG G6'.freeze
|
65
|
+
IPad_Air_2 = 'iPad Air 2'.freeze
|
66
|
+
IPad_6th_Gen = 'iPad 6th Gen'.freeze
|
67
|
+
IPhone_11 = 'iPhone 11'.freeze
|
68
|
+
IPhone_11_Pro_Max = 'iPhone 11 Pro Max'.freeze
|
69
|
+
IPhone_11_Pro = 'iPhone 11 Pro'.freeze
|
70
|
+
Galaxy_S10 = 'Galaxy S10'.freeze
|
71
|
+
Galaxy_S9_Plus = 'Galaxy S9 Plus'.freeze
|
72
|
+
Galaxy_S9 = 'Galaxy S9'.freeze
|
73
|
+
Galaxy_S10_Plus = 'Galaxy S10 Plus'.freeze
|
74
|
+
Galaxy_S8_Plus = 'Galaxy S8 Plus'.freeze
|
75
|
+
Galaxy_Note_10 = 'Galaxy Note 10'.freeze
|
76
|
+
Galaxy_Note_10_Plus = 'Galaxy Note 10 Plus'.freeze
|
77
|
+
Galaxy_Note_9 = 'Galaxy Note 9'.freeze
|
78
|
+
Galaxy_Note_8 = 'Galaxy Note 8'.freeze
|
79
|
+
Galaxy_Note_4 = 'Galaxy Note 4'.freeze
|
80
|
+
Galaxy_Tab_A_SM_T510 = 'Galaxy Tab A SM-T510'.freeze
|
81
|
+
Galaxy_Tab_A7_SM_T500 = 'Galaxy Tab A7 SM-T500'.freeze
|
82
|
+
Galaxy_Tab_S8 = 'Galaxy Tab S8'.freeze
|
83
|
+
Galaxy_Tab_A8 = 'Galaxy Tab A8'.freeze
|
84
|
+
Galaxy_S23 = 'Galaxy S23'.freeze
|
85
|
+
Galaxy_S23_Ultra = 'Galaxy S23 Ultra'.freeze
|
86
|
+
Galaxy_A52s = 'Galaxy A52s'.freeze
|
87
|
+
Pixel_3 = 'Pixel 3'.freeze
|
88
|
+
Pixel_3_XL = 'Pixel 3 XL'.freeze
|
89
|
+
Pixel_4 = 'Pixel 4'.freeze
|
90
|
+
Pixel_4_XL = 'Pixel 4 XL'.freeze
|
91
|
+
Pixel_5 = 'Pixel 5'.freeze
|
92
|
+
IPad_7th_Gen = 'iPad 7th Gen'.freeze
|
93
|
+
OnePlus_7T = 'OnePlus 7T'.freeze
|
94
|
+
OnePlus_7T_Pro = 'OnePlus 7T Pro'.freeze
|
95
|
+
Galaxy_Tab_S7 = 'Galaxy Tab S7'.freeze
|
96
|
+
Sony_Xperia_10_II = 'Sony Xperia 10 II'.freeze
|
97
|
+
Huawei_Mate_50_Pro = 'Huawei Mate 50 Pro'.freeze
|
98
|
+
Huawei_Matepad_11 = 'Huawei Matepad 11'.freeze
|
99
|
+
Huawei_P30 = 'Huawei P30'.freeze
|
100
|
+
Xiaomi_Mi_A3 = 'Xiaomi Mi A3'.freeze
|
101
|
+
Huawei_P40 = 'Huawei P40'.freeze
|
102
|
+
Xiaomi_Redmi_Note_8 = 'Xiaomi Redmi Note 8'.freeze
|
103
|
+
Xiaomi_Mi_Poco_X3_Pro = 'Xiaomi Mi Poco X3 Pro'.freeze
|
104
|
+
Xiaomi_Poco_X3 = 'Xiaomi Poco X3'.freeze
|
105
|
+
|
106
|
+
def enum_values
|
107
|
+
[
|
108
|
+
IPhone_4,
|
109
|
+
IPhone_5SE,
|
110
|
+
IPhone_5S_E, # Deprecated: Use DeviceName::IPhone_5SE instead.
|
111
|
+
IPhone_SE_3rd_Gen,
|
112
|
+
IPhone_6_7_8,
|
113
|
+
IPhone_6_7_8_Plus,
|
114
|
+
IPhone_X,
|
115
|
+
IPhone_13_Mini,
|
116
|
+
IPhone_14_Plus,
|
117
|
+
IPhone_14_Pro,
|
118
|
+
IPhone_15_Pro,
|
119
|
+
BlackBerry_Z30,
|
120
|
+
Nexus_4,
|
121
|
+
Nexus_5,
|
122
|
+
Nexus_5X,
|
123
|
+
Nexus_6,
|
124
|
+
Nexus_6P,
|
125
|
+
Pixel_2,
|
126
|
+
Pixel_2_XL,
|
127
|
+
LG_Optimus_L70,
|
128
|
+
Nokia_N9,
|
129
|
+
Nokia_Lumia_520,
|
130
|
+
Microsoft_Lumia_550,
|
131
|
+
Microsoft_Lumia_950,
|
132
|
+
Galaxy_S3,
|
133
|
+
Galaxy_S_III,
|
134
|
+
Galaxy_S5,
|
135
|
+
Kindle_Fire_HDX,
|
136
|
+
IPad_Mini,
|
137
|
+
IPad,
|
138
|
+
IPad_Pro,
|
139
|
+
IPad_8th_Gen,
|
140
|
+
IPad_10th_Gen,
|
141
|
+
IPad_Mini_4th_Gen,
|
142
|
+
IPad_Mini_6th_Gen,
|
143
|
+
Blackberry_PlayBook,
|
144
|
+
Nexus_10,
|
145
|
+
Nexus_7,
|
146
|
+
Galaxy_Note_3,
|
147
|
+
Galaxy_Note_II,
|
148
|
+
Galaxy_Note_2,
|
149
|
+
Galaxy_S20,
|
150
|
+
Galaxy_S22,
|
151
|
+
Galaxy_S21,
|
152
|
+
Galaxy_S21_Ultra,
|
153
|
+
Galaxy_S22_Ultra,
|
154
|
+
Laptop_with_touch,
|
155
|
+
Laptop_with_HiDPI_screen,
|
156
|
+
Laptop_with_MDPI_screen,
|
157
|
+
IPhone_XR,
|
158
|
+
IPhone_XS_Max,
|
159
|
+
IPhone_XS,
|
160
|
+
Samsung_Galaxy_A5,
|
161
|
+
Galaxy_A5,
|
162
|
+
Samsung_Galaxy_S8,
|
163
|
+
Galaxy_S8,
|
164
|
+
LG_G6,
|
165
|
+
IPad_Air_2,
|
166
|
+
IPad_6th_Gen,
|
167
|
+
IPhone_11,
|
168
|
+
IPhone_11_Pro_Max,
|
169
|
+
IPhone_11_Pro,
|
170
|
+
Galaxy_S10,
|
171
|
+
Galaxy_S9_Plus,
|
172
|
+
Galaxy_S9,
|
173
|
+
Galaxy_S10_Plus,
|
174
|
+
Galaxy_S8_Plus,
|
175
|
+
Galaxy_Note_10,
|
176
|
+
Galaxy_Note_10_Plus,
|
177
|
+
Galaxy_Note_9,
|
178
|
+
Galaxy_Note_8,
|
179
|
+
Galaxy_Note_4,
|
180
|
+
Galaxy_Tab_A_SM_T510,
|
181
|
+
Galaxy_Tab_A7_SM_T500,
|
182
|
+
Galaxy_Tab_S8,
|
183
|
+
Galaxy_Tab_A8,
|
184
|
+
Galaxy_S23,
|
185
|
+
Galaxy_S23_Ultra,
|
186
|
+
Galaxy_A52s,
|
187
|
+
Pixel_3,
|
188
|
+
Pixel_3_XL,
|
189
|
+
Pixel_4,
|
190
|
+
Pixel_4_XL,
|
191
|
+
Pixel_5,
|
192
|
+
IPad_7th_Gen,
|
193
|
+
OnePlus_7T,
|
194
|
+
OnePlus_7T_Pro,
|
195
|
+
Galaxy_Tab_S7,
|
196
|
+
Sony_Xperia_10_II,
|
197
|
+
Huawei_Mate_50_Pro,
|
198
|
+
Huawei_Matepad_11,
|
199
|
+
Huawei_P30,
|
200
|
+
Xiaomi_Mi_A3,
|
201
|
+
Huawei_P40,
|
202
|
+
Xiaomi_Redmi_Note_8,
|
203
|
+
Xiaomi_Mi_Poco_X3_Pro,
|
204
|
+
Xiaomi_Poco_X3,
|
205
|
+
]
|
206
|
+
end
|
207
|
+
end
|
@@ -1,45 +1,111 @@
|
|
1
1
|
# frozen_string_literal: false
|
2
|
+
require_relative 'device_name_generated'
|
3
|
+
|
2
4
|
module Devices
|
5
|
+
include DeviceNameGenerated
|
3
6
|
extend self
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
7
|
+
|
8
|
+
def pascal_device_name
|
9
|
+
{
|
10
|
+
BlackberryPlayBook: 'Devices::Blackberry_PlayBook'.freeze,
|
11
|
+
BlackBerryZ30: 'Devices::BlackBerry_Z30'.freeze,
|
12
|
+
GalaxyA5: 'Devices::Galaxy_A5'.freeze,
|
13
|
+
GalaxyNote10: 'Devices::Galaxy_Note_10'.freeze,
|
14
|
+
GalaxyNote10Plus: 'Devices::Galaxy_Note_10_Plus'.freeze,
|
15
|
+
GalaxyNote2: 'Devices::Galaxy_Note_2'.freeze,
|
16
|
+
GalaxyNote3: 'Devices::Galaxy_Note_3'.freeze,
|
17
|
+
GalaxyNote4: 'Devices::Galaxy_Note_4'.freeze,
|
18
|
+
|
19
|
+
GalaxyNote9: 'Devices::Galaxy_Note_9'.freeze,
|
20
|
+
GalaxyS3: 'Devices::Galaxy_S3'.freeze,
|
21
|
+
GalaxyS5: 'Devices::Galaxy_S5'.freeze,
|
22
|
+
|
23
|
+
GalaxyS9: 'Devices::Galaxy_S9'.freeze,
|
24
|
+
GalaxyS9Plus: 'Devices::Galaxy_S9_Plus'.freeze,
|
25
|
+
GalaxyS10: 'Devices::Galaxy_S10'.freeze,
|
26
|
+
GalaxyS10Plus: 'Devices::Galaxy_S10_Plus'.freeze,
|
27
|
+
GalaxyS20: 'Devices::Galaxy_S20'.freeze,
|
28
|
+
# IPad: 'Devices::IPad'.freeze,
|
29
|
+
IPad6thGen: 'Devices::IPad_6th_Gen'.freeze,
|
30
|
+
IPad7thGen: 'Devices::IPad_7th_Gen'.freeze,
|
31
|
+
IPadAir2: 'Devices::IPad_Air_2'.freeze,
|
32
|
+
IPadMini: 'Devices::IPad_Mini'.freeze,
|
33
|
+
IPadPro: 'Devices::IPad_Pro'.freeze,
|
34
|
+
IPhone11: 'Devices::IPhone_11'.freeze,
|
35
|
+
IPhone11Pro: 'Devices::IPhone_11_Pro'.freeze,
|
36
|
+
IPhone11ProMax: 'Devices::IPhone_11_Pro_Max'.freeze,
|
37
|
+
IPhone4: 'Devices::IPhone_4'.freeze,
|
38
|
+
IPhone5SE: 'Devices::IPhone_5SE'.freeze,
|
39
|
+
IPhone678: 'Devices::IPhone_6_7_8'.freeze,
|
40
|
+
IPhone678Plus: 'Devices::IPhone_6_7_8_Plus'.freeze,
|
41
|
+
IPhoneX: 'Devices::IPhone_X'.freeze,
|
42
|
+
IPhoneXR: 'Devices::IPhone_XR'.freeze,
|
43
|
+
IPhoneXS: 'Devices::IPhone_XS'.freeze,
|
44
|
+
IPhoneXSMax: 'Devices::IPhone_XS_Max'.freeze,
|
45
|
+
|
46
|
+
KindleFireHDX: 'Devices::Kindle_Fire_HDX'.freeze,
|
47
|
+
LaptopWithHIDPIScreen: 'Devices::Laptop_with_HiDPI_screen'.freeze,
|
48
|
+
LaptopWithMDPIScreen: 'Devices::Laptop_with_MDPI_screen'.freeze,
|
49
|
+
LaptopWithTouch: 'Devices::Laptop_with_touch'.freeze,
|
50
|
+
LGG6: 'Devices::LG_G6'.freeze,
|
51
|
+
LGOptimusL70: 'Devices::LG_Optimus_L70'.freeze,
|
52
|
+
MicrosoftLumia550: 'Devices::Microsoft_Lumia_550'.freeze,
|
53
|
+
MicrosoftLumia950: 'Devices::Microsoft_Lumia_950'.freeze,
|
54
|
+
Nexus10: 'Devices::Nexus_10'.freeze,
|
55
|
+
Nexus4: 'Devices::Nexus_4'.freeze,
|
56
|
+
Nexus5: 'Devices::Nexus_5'.freeze,
|
57
|
+
Nexus5X: 'Devices::Nexus_5X'.freeze,
|
58
|
+
Nexus6: 'Devices::Nexus_6'.freeze,
|
59
|
+
Nexus6P: 'Devices::Nexus_6P'.freeze,
|
60
|
+
Nexus7: 'Devices::Nexus_7'.freeze,
|
61
|
+
|
62
|
+
NokiaLumia520: 'Devices::Nokia_Lumia_520'.freeze,
|
63
|
+
NokiaN9: 'Devices::Nokia_N9'.freeze,
|
64
|
+
OnePlus7T: 'Devices::OnePlus_7T'.freeze,
|
65
|
+
OnePlus7TPro: 'Devices::OnePlus_7T_Pro'.freeze,
|
66
|
+
|
67
|
+
Pixel2: 'Devices::Pixel_2'.freeze,
|
68
|
+
Pixel2XL: 'Devices::Pixel_2_XL'.freeze,
|
69
|
+
Pixel3: 'Devices::Pixel_3'.freeze,
|
70
|
+
Pixel3XL: 'Devices::Pixel_3_XL'.freeze,
|
71
|
+
Pixel4: 'Devices::Pixel_4'.freeze,
|
72
|
+
Pixel4XL: 'Devices::Pixel_4_XL'.freeze,
|
73
|
+
Pixel5: 'Devices::Pixel_5'.freeze,
|
74
|
+
GalaxyS22: 'Devices::Galaxy_S22'.freeze,
|
75
|
+
GalaxyTabS7: 'Devices::Galaxy_Tab_S7'.freeze,
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
# looks like this was added here by mistake by https://trello.com/c/M1YiwtHb
|
80
|
+
# so as it not work, then can be ignored
|
81
|
+
# def support_drop_for_device_name
|
82
|
+
# {
|
83
|
+
# IPhone14: 'iPhone 14'.freeze,
|
84
|
+
# IPhone14ProMax: 'iPhone 14 Pro Max'.freeze,
|
85
|
+
# }
|
86
|
+
# end
|
87
|
+
|
88
|
+
# looks like this was added here by mistake by https://trello.com/c/SZAPDKSI
|
89
|
+
# so as it not work, then can be ignored
|
90
|
+
# def unsupported_devices_from_android12
|
91
|
+
# {
|
92
|
+
# XiaomiRedmiNote11: 'Xiaomi Redmi Note 11'.freeze,
|
93
|
+
# XiaomiRedmiNote11Pro: 'Xiaomi Redmi Note 11 Pro'.freeze,
|
94
|
+
# Pixel6: 'Pixel 6'.freeze,
|
95
|
+
# GalaxyS22Plus: 'Galaxy S22 Plus'.freeze,
|
96
|
+
# GalaxyTabS8: 'Galaxy Tab S8'.freeze
|
97
|
+
# }
|
98
|
+
# end
|
99
|
+
|
100
|
+
def const_missing(name)
|
101
|
+
if pascal_device_name.include?(name)
|
102
|
+
# deprecate_constant :... not allow to point to new version (
|
103
|
+
puts "Warning: constant Devices::#{name} is deprecated use #{pascal_device_name[name]} instead."
|
104
|
+
const_get(pascal_device_name[name])
|
105
|
+
else
|
106
|
+
super
|
107
|
+
end
|
44
108
|
end
|
109
|
+
|
110
|
+
# now actual enum_values are in generated file
|
45
111
|
end
|
@@ -19,7 +19,7 @@ module Applitools::Selenium
|
|
19
19
|
FINDERS = {
|
20
20
|
class: 'class name',
|
21
21
|
class_name: 'class name',
|
22
|
-
css: 'css
|
22
|
+
css: 'css',
|
23
23
|
id: 'id',
|
24
24
|
link: 'link text',
|
25
25
|
link_text: 'link text',
|
@@ -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
|
|