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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NTI2OWYyOThlNTk4ZTRkYWFlZjIxZDlmNGUwMzU5MjRkZTA5M2M2Mg==
4
+ YzUwYzEwOGI0MDJiOTdhOWI1MDA5ZDUwNzk3OTFlOGIzM2MwYmY1Ng==
5
5
  data.tar.gz: !binary |-
6
- Nzc3MGM5NmVjZGNiODk4OWVhMzUxNTY5NzY4ZDRmZDg4MGYxMDE3Ng==
6
+ NDQ2MjczNDBjNTA2NDk0M2Q5ZDNiOTFiNzY5Yjg1ZDA3ZjMwNGRmNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTkxYmY2NmVlMWI3NDZlNmYzYWFiYWRlMWU5YjU1YjU2ZDI1YjAyMTcwN2Nm
10
- ZmQwMDYzNjgzYjM5ODg3ZWY2ZmRjNGMyYzZlMmRjMjFhOGI3ZWNlM2IwN2Y4
11
- NWExMzMzMGY1YTk1NmY5MGJhNjAwMTIwMzlkZmIwOWFjMmE1OTM=
9
+ YjEzMzg5NmYwY2FhZDcwMjMxNTE1YTU5YmE1ZDUyNDdmN2E1ZWM5MDkxOTUx
10
+ NTIwMDk1MTMwZDY5YTc1MjMyNTkwZDU4YzgxMTY5YzFjNjRhOTU2MTY0NzEw
11
+ NDU3NTZmNGMyNzU4OWY0YTVjYjU0MzM1ZDBlZTkyZDMzNWZhNTM=
12
12
  data.tar.gz: !binary |-
13
- NTdjMTE4MDVlY2VjZTQyYzJmNDdlMTkwYTViZmEyNzk3YmU0ZGI0YzA4MDli
14
- YjBjZjg5Zjg1ZTM4NWRlYTU0ZmQyNzYxZDhkYzFhNjE0MWViMDg2Mzg5NDMz
15
- ZTMzYzcxMjMzNTZiOGRhY2I5YTA4ZDQzMDFlMGZkNDk4MjJlYmU=
13
+ NzQwYmE0ZjViOTk1OTAzYzJiZmIwZmVmYmFjODk0NDYyYjhmMjYwY2FhNjIz
14
+ M2I3M2MzODY3MTJjZDUxYTEyZGQ0YjhiYWJhYzQxMGMxYjBlNzI1YzU5ZWQx
15
+ MWE5YjZiNzBmMTJjYjBkYzMyNjc2OWJhYzM3ODllMjVlMDBiYzM=
data/.gitignore CHANGED
@@ -12,6 +12,7 @@ lib/bundler/man
12
12
  pkg
13
13
  rdoc
14
14
  .idea/
15
+ .idea-*/
15
16
  spec/
16
17
  spec/reports
17
18
  test/tmp
@@ -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
- iterations = (total_run_time / MATCH_INTERVAL - 1).to_i
39
- iterations.times do
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
 
@@ -1,3 +1,3 @@
1
1
  module Applitools
2
- VERSION = "1.18.0"
2
+ VERSION = "1.19.0"
3
3
  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: 1.18.0
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-27 00:00:00.000000000 Z
11
+ date: 2013-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver