eyes_selenium 2.12.0 → 2.13.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fc78305202b75895bf7025658234b46d93645892
4
- data.tar.gz: bade0478f3a690c4ba373ad74ebd8e9460ce73ce
3
+ metadata.gz: f603b15d48721199afd412c0ac75b003c7419ba1
4
+ data.tar.gz: 95d4bfa2257872778dea75a96fc412d877e6876c
5
5
  SHA512:
6
- metadata.gz: 4e649613d6a93955dad130ae4d305bd34dbc41205ea6603534dcc22032693c83c4d04414b3a4d3d2612eb1bf15416f824c855b39b0da5f98c490c55987f98b7b
7
- data.tar.gz: 0a28cebf023e6724ed65d0bc27d85c6c29359364afcc8b0f9e96ea0714ff8e6955910e768d7d974637b6eef58d62b75465c1efe1556f9af15cd3e55096033cc6
6
+ metadata.gz: 78da07d75facb51ea948e39f586d781d82b17a88e20a46fd08181393d816b616d0fe7e47b3483decb47b028d28b89af8eced65633a5fc5ee5deddc5ce3e7ab6b
7
+ data.tar.gz: 3550f72becadce05d6bbc20464b78f2cf1af9418b203b701d26caa295e95a63773bcd10a0b644462c377dd1f409310df589126512b49354563f0824d3b396236
@@ -98,7 +98,11 @@ class Applitools::Driver
98
98
  # Returns:
99
99
  # +true+ if the driver orientation is landscape.
100
100
  def landscape_orientation?
101
- driver.orientation.to_s.upcase == 'LANDSCAPE'
101
+ begin
102
+ driver.orientation.to_s.upcase == 'LANDSCAPE'
103
+ rescue NameError
104
+ EyesLogger.debug 'driver has no "orientation" attribute. Assuming Portrait.'
105
+ end
102
106
  end
103
107
 
104
108
  # Returns:
@@ -119,7 +123,7 @@ class Applitools::Driver
119
123
  # Returns: +String+ A screenshot in the requested format.
120
124
  def screenshot_as(output_type, rotation=nil)
121
125
  # FIXME Check if screenshot_taker is still required
122
- screenshot = screenshot_taker ? screenshot_taker.screenshot : driver.screenshot_as(:base64)
126
+ screenshot = screenshot_taker ? screenshot_taker.screenshot : driver.screenshot_as(:base64)
123
127
  screenshot = Applitools::Utils::ImageUtils.png_image_from_base64(screenshot)
124
128
  Applitools::Driver.normalize_image!(self, screenshot, rotation)
125
129
  case output_type
@@ -54,12 +54,8 @@ class Applitools::ViewportSize
54
54
  EyesLogger.info "#{__method__}(): Using window size as viewport size."
55
55
  width, height = *browser_size.values
56
56
  width, height = width.ceil, height.ceil
57
- begin
58
- if driver.landscape_orientation? && height > width
59
- width, height = height, width
60
- end
61
- rescue NameError
62
- # Ignored. This error will occur for web based drivers, since they don't have the "orientation" attribute.
57
+ if driver.landscape_orientation? && height > width
58
+ width, height = height, width
63
59
  end
64
60
  end
65
61
  Applitools::Dimension.new(width,height)
@@ -87,7 +83,7 @@ class Applitools::ViewportSize
87
83
  def verify_size(to_verify, sleep_time=1, retries=3)
88
84
  cur_size = nil
89
85
  retries.times do
90
- sleep(sleep_time)
86
+ sleep(sleep_time)
91
87
  cur_size = send(to_verify)
92
88
  return if cur_size.values == dimension.values
93
89
  end
@@ -1,3 +1,3 @@
1
1
  module Applitools
2
- VERSION = '2.12.0'
2
+ VERSION = '2.13.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: 2.12.0
4
+ version: 2.13.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: 2015-04-28 00:00:00.000000000 Z
11
+ date: 2015-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver