watir-screenshot-stitch 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5df5fcff5f022bf2f1e21ed08759c6a3f5ebfd3104f390cc13dbb7cd8a2e0a20
4
- data.tar.gz: f64025091f88b93993161792cfcb43a20690e459570df9164dc75c0a61db75a7
3
+ metadata.gz: ec597fbc318f4f4b357f607d3cdd753c4fc973bb1794d7291ef9276245fa304d
4
+ data.tar.gz: e734c1078dff2892fd4cbb20a401e3a8d3dc20c10c9fdae413c2a3a16efa7022
5
5
  SHA512:
6
- metadata.gz: 10cf306c440573582cf391b9d260f4404c78d65a2a9745cf17692c64c16d8012d9f497a271c71aa190f4c2cdabf5bfe4107a31a3751890c5631a4c2fc12a1ad6
7
- data.tar.gz: 9c65ecf960d4fc94117fc7668e4b9ce36659a97e520e3ab3e04ba72dff87a8aaa106933b8c304756149f45bfa8e9fc6e4e01804b1f1d8a660a0b5a6fa033f0cf
6
+ metadata.gz: a022f0eee18534cb7492195644d12b6555eaa62001e4d32b77ac6be979af8835f770321070bd6e6e30610b1b44ab4797dc06c5dd3a3819ae2d86ed22037b0fa7
7
+ data.tar.gz: 6cc2f2a07fc8103535a9a8dc00783c9e808b718f3c148f95c90ed0134b1ddde01c9d9f1f583f0ef173ef582e58399c5bd5da15dc2a5b4a0d1694a21aa361e85e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- watir-screenshot-stitch (0.6.2)
4
+ watir-screenshot-stitch (0.6.3)
5
5
  binding_of_caller (~> 0.7)
6
6
  mini_magick (~> 4.0)
7
7
  os (~> 1.0)
@@ -1,4 +1,4 @@
1
1
  module WatirScreenshotStitch
2
2
  NAME = 'watir-screenshot-stitch'
3
- VERSION = "0.6.3"
3
+ VERSION = "0.6.4"
4
4
  end
@@ -140,6 +140,8 @@ module Watir
140
140
  def gather_slices
141
141
  @blocks = []
142
142
 
143
+ scroll_to_top
144
+
143
145
  @blocks << MiniMagick::Image.read(Base64.decode64(self.base64))
144
146
 
145
147
  @loops.times do |i|
@@ -148,6 +150,10 @@ module Watir
148
150
  end
149
151
  end
150
152
 
153
+ def scroll_to_top
154
+ @browser.execute_script("document.body.scrollTop = document.documentElement.scrollTop = 0;")
155
+ end
156
+
151
157
  def stitch_together
152
158
  @blocks.each_with_index do |next_screenshot, i|
153
159
  if (@blocks.size == (i+1)) && (@original_page_height == @page_height)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir-screenshot-stitch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Nissen