eyes_selenium 1.18.0 → 1.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitignore +1 -0
- data/lib/eyes_selenium/eyes/match_window_task.rb +9 -6
- data/lib/eyes_selenium/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzUwYzEwOGI0MDJiOTdhOWI1MDA5ZDUwNzk3OTFlOGIzM2MwYmY1Ng==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDQ2MjczNDBjNTA2NDk0M2Q5ZDNiOTFiNzY5Yjg1ZDA3ZjMwNGRmNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjEzMzg5NmYwY2FhZDcwMjMxNTE1YTU5YmE1ZDUyNDdmN2E1ZWM5MDkxOTUx
|
10
|
+
NTIwMDk1MTMwZDY5YTc1MjMyNTkwZDU4YzgxMTY5YzFjNjRhOTU2MTY0NzEw
|
11
|
+
NDU3NTZmNGMyNzU4OWY0YTVjYjU0MzM1ZDBlZTkyZDMzNWZhNTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzQwYmE0ZjViOTk1OTAzYzJiZmIwZmVmYmFjODk0NDYyYjhmMjYwY2FhNjIz
|
14
|
+
M2I3M2MzODY3MTJjZDUxYTEyZGQ0YjhiYWJhYzQxMGMxYjBlNzI1YzU5ZWQx
|
15
|
+
MWE5YjZiNzBmMTJjYjBkYzMyNjc2OWJhYzM3ODllMjVlMDBiYzM=
|
data/.gitignore
CHANGED
@@ -5,9 +5,10 @@ class Applitools::MatchWindowTask
|
|
5
5
|
|
6
6
|
MATCH_INTERVAL = 0.5
|
7
7
|
AppOutput = Struct.new(:title, :screenshot64)
|
8
|
-
|
8
|
+
|
9
9
|
attr_reader :agent_connector, :session, :driver, :max_window_load_time
|
10
10
|
|
11
|
+
## max_load_time: maximum wait time for check window, in seconds
|
11
12
|
def initialize(agent_connector, session, driver, max_window_load_time)
|
12
13
|
@agent_connector = agent_connector
|
13
14
|
@session = session
|
@@ -18,7 +19,7 @@ class Applitools::MatchWindowTask
|
|
18
19
|
end
|
19
20
|
|
20
21
|
def match_window(tag,run_once_after_wait=false)
|
21
|
-
res = if max_window_load_time.zero?
|
22
|
+
res = if max_window_load_time.zero?
|
22
23
|
run(tag)
|
23
24
|
elsif run_once_after_wait
|
24
25
|
run(tag, max_window_load_time)
|
@@ -35,10 +36,12 @@ class Applitools::MatchWindowTask
|
|
35
36
|
end
|
36
37
|
|
37
38
|
def run_with_intervals(tag, total_run_time)
|
38
|
-
|
39
|
-
|
39
|
+
start = Time.now
|
40
|
+
match_retry = total_run_time
|
41
|
+
while match_retry > 0
|
40
42
|
sleep(MATCH_INTERVAL)
|
41
43
|
return true if match(tag, true)
|
44
|
+
match_retry -= (Time.now - start)
|
42
45
|
end
|
43
46
|
|
44
47
|
## lets try one more time if we still don't have a match
|
@@ -58,7 +61,7 @@ class Applitools::MatchWindowTask
|
|
58
61
|
user_inputs = []
|
59
62
|
if @last_checked_window.nil?
|
60
63
|
user_inputs = driver.eyes.user_inputs
|
61
|
-
else
|
64
|
+
else
|
62
65
|
driver.eyes.user_inputs.each do |trigger|
|
63
66
|
if trigger.is_a? Applitools::MouseTrigger
|
64
67
|
trigger_left = trigger.control.left + trigger.location.x
|
@@ -80,7 +83,7 @@ class Applitools::MatchWindowTask
|
|
80
83
|
end
|
81
84
|
end
|
82
85
|
end
|
83
|
-
|
86
|
+
|
84
87
|
Applitools::MatchWindowData.new(app_output, user_inputs, tag, ignore_mismatch, compressed_screenshot)
|
85
88
|
end
|
86
89
|
|
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: 1.
|
4
|
+
version: 1.19.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: 2013-11-
|
11
|
+
date: 2013-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|