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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/watir-screenshot-stitch/version.rb +1 -1
- data/lib/watir-screenshot-stitch.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec597fbc318f4f4b357f607d3cdd753c4fc973bb1794d7291ef9276245fa304d
|
4
|
+
data.tar.gz: e734c1078dff2892fd4cbb20a401e3a8d3dc20c10c9fdae413c2a3a16efa7022
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a022f0eee18534cb7492195644d12b6555eaa62001e4d32b77ac6be979af8835f770321070bd6e6e30610b1b44ab4797dc06c5dd3a3819ae2d86ed22037b0fa7
|
7
|
+
data.tar.gz: 6cc2f2a07fc8103535a9a8dc00783c9e808b718f3c148f95c90ed0134b1ddde01c9d9f1f583f0ef173ef582e58399c5bd5da15dc2a5b4a0d1694a21aa361e85e
|
data/Gemfile.lock
CHANGED
@@ -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)
|