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
@@ -0,0 +1,93 @@
|
|
1
|
+
# GENERATED FILE #
|
2
|
+
|
3
|
+
module IosDeviceNameGenerated
|
4
|
+
extend self
|
5
|
+
IPad_7 = 'iPad (7th generation)'.freeze
|
6
|
+
IPad_9 = 'iPad (9th generation)'.freeze
|
7
|
+
IPad_10 = 'iPad (10th generation)'.freeze
|
8
|
+
IPad_mini_6 = 'iPad mini (6th generation)'.freeze
|
9
|
+
IPad_Air_4 = 'iPad Air (4th generation)'.freeze
|
10
|
+
|
11
|
+
# Deprecated: Use IosDeviceName::IPad_Pro_12_9_inch_3 instead.
|
12
|
+
# deprecate_constant :IPad_Pro_3 not allow to point to new version (
|
13
|
+
IPad_Pro_3 = 'iPad Pro (12.9-inch) (3rd generation)'.freeze
|
14
|
+
IPad_Pro_12_9_inch_3 = 'iPad Pro (12.9-inch) (3rd generation)'.freeze
|
15
|
+
|
16
|
+
# Deprecated: Use IosDeviceName::IPad_Pro_11_inch_4 instead.
|
17
|
+
# deprecate_constant :IPad_Pro_4 not allow to point to new version (
|
18
|
+
IPad_Pro_4 = 'iPad Pro (11-inch) (4th generation)'.freeze
|
19
|
+
IPad_Pro_11_inch_4 = 'iPad Pro (11-inch) (4th generation)'.freeze
|
20
|
+
IPhone_SE_2 = 'iPhone SE (2nd generation)'.freeze
|
21
|
+
IPhone_SE_3 = 'iPhone SE (3rd generation)'.freeze
|
22
|
+
IPhone_XR = 'iPhone XR'.freeze
|
23
|
+
|
24
|
+
# Deprecated: Use IosDeviceName::IPhone_Xs instead.
|
25
|
+
# deprecate_constant :IPhone_XS not allow to point to new version (
|
26
|
+
IPhone_XS = 'iPhone Xs'.freeze
|
27
|
+
IPhone_Xs = 'iPhone Xs'.freeze
|
28
|
+
IPhone_11 = 'iPhone 11'.freeze
|
29
|
+
IPhone_11_Pro_Max = 'iPhone 11 Pro Max'.freeze
|
30
|
+
IPhone_11_Pro = 'iPhone 11 Pro'.freeze
|
31
|
+
IPhone_12 = 'iPhone 12'.freeze
|
32
|
+
IPhone_12_mini = 'iPhone 12 mini'.freeze
|
33
|
+
IPhone_12_Pro_Max = 'iPhone 12 Pro Max'.freeze
|
34
|
+
IPhone_12_Pro = 'iPhone 12 Pro'.freeze
|
35
|
+
IPhone_13 = 'iPhone 13'.freeze
|
36
|
+
IPhone_13_mini = 'iPhone 13 mini'.freeze
|
37
|
+
IPhone_13_Pro_Max = 'iPhone 13 Pro Max'.freeze
|
38
|
+
IPhone_13_Pro = 'iPhone 13 Pro'.freeze
|
39
|
+
IPhone_14 = 'iPhone 14'.freeze
|
40
|
+
IPhone_14_Pro_Max = 'iPhone 14 Pro Max'.freeze
|
41
|
+
IPhone_14_Pro = 'iPhone 14 Pro'.freeze
|
42
|
+
IPhone_14_Plus = 'iPhone 14 Plus'.freeze
|
43
|
+
IPhone_15 = 'iPhone 15'.freeze
|
44
|
+
IPhone_15_Pro_Max = 'iPhone 15 Pro Max'.freeze
|
45
|
+
IPhone_15_Pro = 'iPhone 15 Pro'.freeze
|
46
|
+
IPhone_15_Plus = 'iPhone 15 Plus'.freeze
|
47
|
+
IPhone_16 = 'iPhone 16'.freeze
|
48
|
+
IPhone_16_Pro_Max = 'iPhone 16 Pro Max'.freeze
|
49
|
+
IPhone_16_Pro = 'iPhone 16 Pro'.freeze
|
50
|
+
IPhone_16_Plus = 'iPhone 16 Plus'.freeze
|
51
|
+
|
52
|
+
def enum_values
|
53
|
+
[
|
54
|
+
IPad_7,
|
55
|
+
IPad_9,
|
56
|
+
IPad_10,
|
57
|
+
IPad_mini_6,
|
58
|
+
IPad_Air_4,
|
59
|
+
IPad_Pro_3, # Deprecated: Use IosDeviceName::IPad_Pro_12_9_inch_3 instead.
|
60
|
+
IPad_Pro_12_9_inch_3,
|
61
|
+
IPad_Pro_4, # Deprecated: Use IosDeviceName::IPad_Pro_11_inch_4 instead.
|
62
|
+
IPad_Pro_11_inch_4,
|
63
|
+
IPhone_SE_2,
|
64
|
+
IPhone_SE_3,
|
65
|
+
IPhone_XR,
|
66
|
+
IPhone_XS, # Deprecated: Use IosDeviceName::IPhone_Xs instead.
|
67
|
+
IPhone_Xs,
|
68
|
+
IPhone_11,
|
69
|
+
IPhone_11_Pro_Max,
|
70
|
+
IPhone_11_Pro,
|
71
|
+
IPhone_12,
|
72
|
+
IPhone_12_mini,
|
73
|
+
IPhone_12_Pro_Max,
|
74
|
+
IPhone_12_Pro,
|
75
|
+
IPhone_13,
|
76
|
+
IPhone_13_mini,
|
77
|
+
IPhone_13_Pro_Max,
|
78
|
+
IPhone_13_Pro,
|
79
|
+
IPhone_14,
|
80
|
+
IPhone_14_Pro_Max,
|
81
|
+
IPhone_14_Pro,
|
82
|
+
IPhone_14_Plus,
|
83
|
+
IPhone_15,
|
84
|
+
IPhone_15_Pro_Max,
|
85
|
+
IPhone_15_Pro,
|
86
|
+
IPhone_15_Plus,
|
87
|
+
IPhone_16,
|
88
|
+
IPhone_16_Pro_Max,
|
89
|
+
IPhone_16_Pro,
|
90
|
+
IPhone_16_Plus,
|
91
|
+
]
|
92
|
+
end
|
93
|
+
end
|
@@ -58,7 +58,8 @@ module Applitools
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def init_or_renew_threads
|
61
|
-
|
61
|
+
one_concurrency = 1 # Thread's moved to universal server
|
62
|
+
(one_concurrency - @thread_group.list.count).times do
|
62
63
|
logger.debug 'starting new thread (task worker)'
|
63
64
|
next_thread
|
64
65
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'base64'
|
4
4
|
require 'digest'
|
5
|
-
require 'nokogiri'
|
5
|
+
# require 'nokogiri'
|
6
6
|
|
7
7
|
module Applitools
|
8
8
|
module Selenium
|
@@ -58,11 +58,12 @@ module Applitools
|
|
58
58
|
|
59
59
|
def lookup_for_svg_resources
|
60
60
|
return unless %r{^image/svg\+xml} =~ content_type && handle_discovered_resources_block
|
61
|
-
attrs =
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
61
|
+
attrs = []
|
62
|
+
# attrs = Nokogiri::XML(content)
|
63
|
+
# .xpath("//@*[namespace-uri(.) = 'http://www.w3.org/1999/xlink'] | //@href")
|
64
|
+
# .select { |a| a.name == 'href' }
|
65
|
+
# .map(&:value)
|
66
|
+
# .select { |a| /^(?!#).*/.match(a) }
|
66
67
|
handle_discovered_resources_block.call(attrs, url)
|
67
68
|
end
|
68
69
|
|
@@ -7,6 +7,13 @@ require 'securerandom'
|
|
7
7
|
module Applitools
|
8
8
|
module Selenium
|
9
9
|
class VisualGridEyes
|
10
|
+
# new open, with eyes-manager
|
11
|
+
include Applitools::UniversalEyesOpen
|
12
|
+
# all checks here
|
13
|
+
include Applitools::UniversalEyesChecks
|
14
|
+
# add extract_text, extract_text_regions, locate
|
15
|
+
include Applitools::UniversalNewApi
|
16
|
+
|
10
17
|
include Applitools::Selenium::Concerns::SeleniumEyes
|
11
18
|
USE_DEFAULT_MATCH_TIMEOUT = -1
|
12
19
|
extend Forwardable
|
@@ -15,6 +22,7 @@ module Applitools
|
|
15
22
|
|
16
23
|
attr_accessor :visual_grid_manager, :driver, :current_url, :current_config, :fetched_cache_map,
|
17
24
|
:utils,
|
25
|
+
:enable_patterns,
|
18
26
|
:config, :driver_lock, :test_uuid, :dont_get_title
|
19
27
|
attr_accessor :test_list
|
20
28
|
|
@@ -26,6 +34,10 @@ module Applitools
|
|
26
34
|
def_delegators 'config', *Applitools::Selenium::Configuration.methods_to_delegate
|
27
35
|
def_delegators 'config', *Applitools::EyesBaseConfiguration.methods_to_delegate
|
28
36
|
|
37
|
+
alias runner visual_grid_manager
|
38
|
+
attr_accessor :universal_eyes, :universal_driver
|
39
|
+
attr_accessor :debug_screenshots, :save_failed_tests, :scale_ratio, :disabled, :stitching_overlap, :compare_with_parent_branch
|
40
|
+
|
29
41
|
def initialize(visual_grid_manager, server_url = nil)
|
30
42
|
ensure_config
|
31
43
|
@server_connector = Applitools::Connectivity::ServerConnector.new(server_url)
|
@@ -41,8 +53,16 @@ module Applitools
|
|
41
53
|
self.utils = Applitools::Utils::EyesSeleniumUtils
|
42
54
|
end
|
43
55
|
|
56
|
+
def self.environment_sdk
|
57
|
+
{
|
58
|
+
name: :eyes_selenium,
|
59
|
+
currentVersion: Applitools::EyesSelenium::VERSION
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
44
63
|
def ensure_config
|
45
64
|
self.config = Applitools::Selenium::Configuration.new
|
65
|
+
self.send_dom = true
|
46
66
|
end
|
47
67
|
|
48
68
|
def full_agent_id
|
@@ -56,51 +76,61 @@ module Applitools
|
|
56
76
|
end
|
57
77
|
|
58
78
|
def open(*args)
|
59
|
-
|
79
|
+
# visual_grid_manager.add_batch(batch.id) { visual_grid_manager.close_batch(batch.id) }
|
80
|
+
# self.test_uuid = SecureRandom.uuid
|
60
81
|
options = Applitools::Utils.extract_options!(args)
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
config.
|
65
|
-
config.
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
self.
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
visual_grid_manager.
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
82
|
+
universal_open(options)
|
83
|
+
# Applitools::ArgumentGuard.hash(options, 'options', [:driver])
|
84
|
+
#
|
85
|
+
# config.app_name = options[:app_name] if options[:app_name]
|
86
|
+
# config.test_name = options[:test_name] if options[:test_name]
|
87
|
+
# config.agent_run_id = "#{config.test_name}--#{SecureRandom.hex(10)}"
|
88
|
+
#
|
89
|
+
# if config.viewport_size.nil? || config.viewport_size && config.viewport_size.empty?
|
90
|
+
# config.viewport_size = Applitools::RectangleSize.from_any_argument(options[:viewport_size]) if options[:viewport_size]
|
91
|
+
# end
|
92
|
+
#
|
93
|
+
# self.driver = Applitools::Selenium::SeleniumEyes.eyes_driver(options.delete(:driver), self)
|
94
|
+
# self.current_url = driver.current_url
|
95
|
+
#
|
96
|
+
# if viewport_size
|
97
|
+
# set_viewport_size(viewport_size)
|
98
|
+
# else
|
99
|
+
# self.viewport_size = get_viewport_size
|
100
|
+
# end
|
101
|
+
#
|
102
|
+
# visual_grid_manager.open(self)
|
103
|
+
# visual_grid_manager.add_batch(batch.id) do
|
104
|
+
# server_connector.close_batch(batch.id)
|
105
|
+
# end
|
106
|
+
#
|
107
|
+
# logger.info('Getting all browsers info...')
|
108
|
+
# browsers_info_list = config.browsers_info
|
109
|
+
# logger.info('Creating test descriptors for each browser info...')
|
110
|
+
# browsers_info_list.each(viewport_size) do |bi|
|
111
|
+
# test = Applitools::Selenium::RunningTest.new(eyes_connector, bi, driver).tap do |t|
|
112
|
+
# t.on_results_received do |results|
|
113
|
+
# visual_grid_manager.aggregate_result(results)
|
114
|
+
# end
|
115
|
+
# t.test_uuid = test_uuid
|
116
|
+
# end
|
117
|
+
# test_list.push test
|
118
|
+
# end
|
119
|
+
# self.opened = true
|
120
|
+
# driver
|
99
121
|
end
|
100
122
|
|
101
123
|
def get_viewport_size(web_driver = driver)
|
102
124
|
Applitools::ArgumentGuard.not_nil 'web_driver', web_driver
|
103
|
-
self.utils.extract_viewport_size(driver)
|
125
|
+
# self.utils.extract_viewport_size(driver)
|
126
|
+
driver_config_json = universal_driver_config(web_driver)
|
127
|
+
|
128
|
+
Applitools::EyesLogger.debug 'extract_viewport_size()'
|
129
|
+
viewport_size = runner.universal_client.core_get_viewport_size(driver_config_json)
|
130
|
+
result = Applitools::RectangleSize.new viewport_size[:width], viewport_size[:height]
|
131
|
+
|
132
|
+
Applitools::EyesLogger.debug "Viewport size is #{result}."
|
133
|
+
result
|
104
134
|
end
|
105
135
|
|
106
136
|
def eyes_connector
|
@@ -127,6 +157,8 @@ module Applitools
|
|
127
157
|
render_task = nil
|
128
158
|
target.default_full_page_for_vg
|
129
159
|
|
160
|
+
return universal_check(tag, target)
|
161
|
+
|
130
162
|
target_to_check = target.finalize
|
131
163
|
begin
|
132
164
|
check_in_frame(target_frames: target_to_check.frames) do
|
@@ -292,26 +324,67 @@ module Applitools
|
|
292
324
|
end
|
293
325
|
|
294
326
|
def close_async
|
295
|
-
test_list.each(&:close)
|
327
|
+
# test_list.each(&:close)
|
328
|
+
close(false)
|
296
329
|
end
|
297
330
|
|
298
331
|
def close(throw_exception = true)
|
299
|
-
|
300
|
-
|
332
|
+
logger.info "close(#{throw_exception})"
|
333
|
+
logger.info 'Ending server session...'
|
301
334
|
|
302
|
-
|
303
|
-
|
304
|
-
end
|
335
|
+
raise Applitools::EyesNotOpenException.new 'Eyes not open' unless open?
|
336
|
+
universal_results = universal_eyes.close # Array even for one test
|
305
337
|
self.opened = false
|
338
|
+
all_results = get_results(throw_exception)
|
339
|
+
# universal_results = universal_eyes.eyes_get_results # Array even for one test
|
340
|
+
# # require 'pry'
|
341
|
+
# # binding.pry
|
342
|
+
# raise Applitools::EyesError.new("Request failed: #{universal_results[:message]}") if server_error?(universal_results)
|
343
|
+
# results = universal_results.map {|result| Applitools::TestResults.new(result) }
|
344
|
+
# # results = results.first if results.size == 1
|
345
|
+
# # session_results_url = results.url
|
346
|
+
# all_results = results.compact
|
347
|
+
|
348
|
+
|
349
|
+
# return false if test_list.empty?
|
350
|
+
# close_async
|
351
|
+
#
|
352
|
+
# until (states = test_list.map(&:state_name).uniq).count == 1 && states.first == :completed
|
353
|
+
# sleep 0.5
|
354
|
+
# end
|
355
|
+
# self.opened = false
|
356
|
+
#
|
357
|
+
# test_list.select { |t| t.pending_exceptions && !t.pending_exceptions.empty? }.each do |t|
|
358
|
+
# t.pending_exceptions.each do |e|
|
359
|
+
# raise e
|
360
|
+
# end
|
361
|
+
# end
|
362
|
+
#
|
363
|
+
# all_results = test_list.map(&:test_result).compact
|
364
|
+
# failed_results = all_results.select { |r| !r.as_expected? }
|
365
|
+
#
|
366
|
+
# if throw_exception
|
367
|
+
# all_results.each do |r|
|
368
|
+
# raise Applitools::NewTestError.new new_test_error_message(r), r if r.new?
|
369
|
+
# raise Applitools::DiffsFoundError.new diffs_found_error_message(r), r if r.unresolved? && !r.new?
|
370
|
+
# raise Applitools::TestFailedError.new test_failed_error_message(r), r if r.failed?
|
371
|
+
# end
|
372
|
+
# end
|
373
|
+
|
374
|
+
# failed_results.empty? ? all_results.first : failed_results.first
|
375
|
+
all_results.first
|
376
|
+
end
|
306
377
|
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
end
|
311
|
-
end
|
378
|
+
def get_results(throw_exception = true)
|
379
|
+
logger.info "get_results(#{throw_exception})"
|
380
|
+
logger.info 'Getting results...'
|
312
381
|
|
313
|
-
|
314
|
-
|
382
|
+
universal_results = universal_eyes.eyes_get_results # Array even for one test
|
383
|
+
# require 'pry'
|
384
|
+
# binding.pry
|
385
|
+
raise Applitools::EyesError.new("Request failed: #{universal_results[:message]}") if server_error?(universal_results)
|
386
|
+
results = universal_results.map {|result| Applitools::TestResults.new(result) }
|
387
|
+
all_results = results.compact
|
315
388
|
|
316
389
|
if throw_exception
|
317
390
|
all_results.each do |r|
|
@@ -320,17 +393,18 @@ module Applitools
|
|
320
393
|
raise Applitools::TestFailedError.new test_failed_error_message(r), r if r.failed?
|
321
394
|
end
|
322
395
|
end
|
323
|
-
|
324
|
-
failed_results.empty? ? all_results.first : failed_results
|
396
|
+
all_results
|
325
397
|
end
|
326
398
|
|
327
399
|
def abort_async
|
328
400
|
test_list.each(&:abort)
|
401
|
+
universal_sdk_abort
|
329
402
|
end
|
330
403
|
|
331
404
|
def abort_if_not_closed
|
332
405
|
self.opened = false
|
333
406
|
test_list.each(&:abort)
|
407
|
+
universal_sdk_abort
|
334
408
|
end
|
335
409
|
|
336
410
|
alias abort abort_if_not_closed
|
@@ -347,6 +421,8 @@ module Applitools
|
|
347
421
|
|
348
422
|
# rubocop:disable Style/AccessorMethodName
|
349
423
|
def set_viewport_size(value)
|
424
|
+
# require('pry')
|
425
|
+
# binding.pry
|
350
426
|
self.utils.set_viewport_size driver, value
|
351
427
|
rescue => e
|
352
428
|
logger.error e.class.to_s
|
@@ -398,6 +474,14 @@ module Applitools
|
|
398
474
|
|
399
475
|
def add_text_trigger(_control, _text); end
|
400
476
|
|
477
|
+
def disabled=(value)
|
478
|
+
@disabled = Applitools::Utils.boolean_value value
|
479
|
+
end
|
480
|
+
|
481
|
+
def disabled?
|
482
|
+
@disabled
|
483
|
+
end
|
484
|
+
|
401
485
|
private :new_test_error_message, :diffs_found_error_message, :test_failed_error_message
|
402
486
|
|
403
487
|
private
|
@@ -9,8 +9,8 @@ module Applitools
|
|
9
9
|
|
10
10
|
alias queue render_queue
|
11
11
|
|
12
|
-
def initialize(concurrent_open_sessions = 10)
|
13
|
-
super()
|
12
|
+
def initialize(concurrent_open_sessions = 10, mask_log = false)
|
13
|
+
super(mask_log=mask_log)
|
14
14
|
self.all_eyes = []
|
15
15
|
self.render_queue = []
|
16
16
|
@thread_pool = Applitools::Selenium::VGThreadPool.new(concurrent_open_sessions)
|
@@ -61,6 +61,10 @@ module Applitools
|
|
61
61
|
super
|
62
62
|
end
|
63
63
|
|
64
|
+
def universal_eyes_manager_config
|
65
|
+
Applitools::UniversalEyesManagerConfig.vg(@thread_pool.concurrency)
|
66
|
+
end
|
67
|
+
|
64
68
|
private
|
65
69
|
|
66
70
|
def all_running_tests
|
data/lib/eyes_selenium.rb
CHANGED
@@ -12,8 +12,11 @@ module Applitools
|
|
12
12
|
module Selenium
|
13
13
|
extend Applitools::RequireUtils
|
14
14
|
class UnsupportedCoordinateType < EyesError; end
|
15
|
-
def self.
|
16
|
-
File.dirname(File.expand_path(__FILE__))
|
15
|
+
def self.require_dir(dir)
|
16
|
+
load_dir = File.dirname(File.expand_path(__FILE__))
|
17
|
+
Dir[File.join(load_dir, 'applitools', dir, '*.rb')].sort.each do |f|
|
18
|
+
require f
|
19
|
+
end
|
17
20
|
end
|
18
21
|
end
|
19
22
|
end
|
@@ -21,6 +24,7 @@ end
|
|
21
24
|
Applitools::Selenium.require_dir 'selenium/concerns'
|
22
25
|
Applitools::Selenium.require_dir 'selenium/scripts'
|
23
26
|
Applitools::Selenium.require_dir 'selenium'
|
27
|
+
Applitools::Selenium.require_dir 'eyes_selenium'
|
24
28
|
Applitools::Selenium.require_dir 'selenium/visual_grid'
|
25
29
|
Applitools::Selenium.require_dir 'selenium/dom_capture'
|
26
30
|
Applitools::Selenium.require_dir 'selenium/css_parser'
|
@@ -31,5 +35,22 @@ if defined? Selenium::WebDriver::Driver
|
|
31
35
|
is_mobile_device = capabilities['platformName'] ? true : false
|
32
36
|
Applitools::Selenium::Driver.new(eyes, driver: self, is_mobile_device: is_mobile_device)
|
33
37
|
end
|
38
|
+
|
39
|
+
def universal_driver_config
|
40
|
+
hidden_server_url = bridge.http.send(:server_url).to_s
|
41
|
+
if respond_to?(:session_id)
|
42
|
+
{
|
43
|
+
serverUrl: hidden_server_url,
|
44
|
+
sessionId: session_id,
|
45
|
+
capabilities: capabilities.as_json
|
46
|
+
}
|
47
|
+
else
|
48
|
+
{
|
49
|
+
serverUrl: hidden_server_url,
|
50
|
+
sessionId: bridge.session_id,
|
51
|
+
capabilities: capabilities.as_json
|
52
|
+
}
|
53
|
+
end
|
54
|
+
end
|
34
55
|
end
|
35
56
|
end
|
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
|
+
version: 6.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Applitools Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eyes_core
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 6.7.0
|
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:
|
26
|
+
version: 6.7.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: selenium-webdriver
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '3'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: css_parser
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,21 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: nokogiri
|
70
|
+
name: state_machines
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
73
|
- - ">="
|
@@ -101,6 +87,10 @@ executables: []
|
|
101
87
|
extensions: []
|
102
88
|
extra_rdoc_files: []
|
103
89
|
files:
|
90
|
+
- CHANGELOG.md
|
91
|
+
- Rakefile
|
92
|
+
- eyes_selenium.gemspec
|
93
|
+
- lib/applitools/eyes_selenium/version.rb
|
104
94
|
- lib/applitools/selenium/border_aware_element_content_location_provider.rb
|
105
95
|
- lib/applitools/selenium/browser.rb
|
106
96
|
- lib/applitools/selenium/browser_types.rb
|
@@ -112,6 +102,7 @@ files:
|
|
112
102
|
- lib/applitools/selenium/css_transform/css_transform.rb
|
113
103
|
- lib/applitools/selenium/css_translate_element_position_provider.rb
|
114
104
|
- lib/applitools/selenium/css_translate_position_provider.rb
|
105
|
+
- lib/applitools/selenium/device_name_generated.rb
|
115
106
|
- lib/applitools/selenium/devices.rb
|
116
107
|
- lib/applitools/selenium/dom_capture/dom_capture.rb
|
117
108
|
- lib/applitools/selenium/dom_capture/dom_capture_script.rb
|
@@ -141,8 +132,6 @@ files:
|
|
141
132
|
- lib/applitools/selenium/scripts/.gitignore
|
142
133
|
- lib/applitools/selenium/scripts/get_element_xpath.rb
|
143
134
|
- lib/applitools/selenium/scripts/package.json
|
144
|
-
- lib/applitools/selenium/scripts/process_page_and_poll.rb
|
145
|
-
- lib/applitools/selenium/scripts/templates.rb
|
146
135
|
- lib/applitools/selenium/scroll_position_provider.rb
|
147
136
|
- lib/applitools/selenium/selenium_eyes.rb
|
148
137
|
- lib/applitools/selenium/stitch_modes.rb
|
@@ -159,6 +148,7 @@ files:
|
|
159
148
|
- lib/applitools/selenium/visual_grid/i_render_browser_info.rb
|
160
149
|
- lib/applitools/selenium/visual_grid/ios_device_info.rb
|
161
150
|
- lib/applitools/selenium/visual_grid/ios_device_name.rb
|
151
|
+
- lib/applitools/selenium/visual_grid/ios_device_name_generated.rb
|
162
152
|
- lib/applitools/selenium/visual_grid/render_browser_info.rb
|
163
153
|
- lib/applitools/selenium/visual_grid/render_info.rb
|
164
154
|
- lib/applitools/selenium/visual_grid/render_request.rb
|
@@ -174,7 +164,6 @@ files:
|
|
174
164
|
- lib/applitools/selenium/visual_grid/visual_grid_eyes.rb
|
175
165
|
- lib/applitools/selenium/visual_grid/visual_grid_runner.rb
|
176
166
|
- lib/applitools/selenium/visual_grid/web_element_region.rb
|
177
|
-
- lib/applitools/version.rb
|
178
167
|
- lib/eyes_selenium.rb
|
179
168
|
homepage: https://www.applitools.com
|
180
169
|
licenses:
|
@@ -195,8 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
184
|
- !ruby/object:Gem::Version
|
196
185
|
version: '0'
|
197
186
|
requirements: []
|
198
|
-
|
199
|
-
rubygems_version: 2.6.14.3
|
187
|
+
rubygems_version: 3.1.6
|
200
188
|
signing_key:
|
201
189
|
specification_version: 4
|
202
190
|
summary: Applitools Ruby Selenium SDK
|