watirsplash 0.2.1 → 0.2.2
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.
- data/History.rdoc +4 -0
- data/README.rdoc +7 -3
- data/VERSION +1 -1
- data/lib/watirsplash/html_formatter.rb +2 -1
- data/lib/watirsplash/watir.rb +4 -1
- metadata +5 -5
data/History.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -35,7 +35,7 @@ testing right away!
|
|
35
35
|
|
36
36
|
== SYNOPSIS:
|
37
37
|
|
38
|
-
|
38
|
+
=== Without WatirSplash:
|
39
39
|
require 'watir'
|
40
40
|
require 'spec'
|
41
41
|
|
@@ -66,7 +66,7 @@ testing right away!
|
|
66
66
|
|
67
67
|
|
68
68
|
|
69
|
-
|
69
|
+
=== With WatirSplash:
|
70
70
|
describe "Google" do
|
71
71
|
before :all do
|
72
72
|
goto "http://google.com"
|
@@ -101,7 +101,7 @@ testing right away!
|
|
101
101
|
* install Ruby 1.8.6:
|
102
102
|
http://rubyinstaller.org/
|
103
103
|
|
104
|
-
* install ImageMagick with rmagick-win32 for saving the screenshots in PNG format:
|
104
|
+
* install ImageMagick with rmagick-win32 gem for saving the screenshots in PNG format:
|
105
105
|
http://rubyforge.org/frs/?group_id=12&release_id=42049
|
106
106
|
|
107
107
|
* install WatirSplash:
|
@@ -201,3 +201,7 @@ If you see the following error message when running watirsplash:
|
|
201
201
|
Solution:
|
202
202
|
This is caused by ImageMagick.
|
203
203
|
Install Microsoft Visual C++ 2008 SP1 Redistributable Package to solve the problem.
|
204
|
+
|
205
|
+
== COPYRIGHT
|
206
|
+
|
207
|
+
Copyright © 2010 Jarmo Pertman. See LICENSE for details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
@@ -68,8 +68,9 @@ module WatirSplash
|
|
68
68
|
file_name
|
69
69
|
end
|
70
70
|
|
71
|
-
def save_screenshot(description="Screenshot", hwnd
|
71
|
+
def save_screenshot(description="Screenshot", hwnd=nil) # :nodoc:
|
72
72
|
begin
|
73
|
+
hwnd ||= @browser.hwnd
|
73
74
|
@browser.bring_to_front
|
74
75
|
Win32::Screenshot.hwnd(hwnd) do |width, height, blob|
|
75
76
|
file_name = file_path("screenshot.png", description)
|
data/lib/watirsplash/watir.rb
CHANGED
@@ -8,6 +8,8 @@ end
|
|
8
8
|
# patches for Watir
|
9
9
|
module Watir
|
10
10
|
class IE #:nodoc:all
|
11
|
+
READYSTATE_INTERACTIVE = 3
|
12
|
+
|
11
13
|
# This is Watir's overriden wait method, which is used in many places for deciding
|
12
14
|
# if browser is ready or not. We have to patch one line in it to work properly
|
13
15
|
# when file save as dialog has been displayed. For some reason READYSTATE (4)
|
@@ -26,7 +28,8 @@ module Watir
|
|
26
28
|
sleep a_moment
|
27
29
|
end
|
28
30
|
# this is the line which has been changed to accept also state 3
|
29
|
-
until @ie.readyState
|
31
|
+
until @ie.readyState == READYSTATE_INTERACTIVE ||
|
32
|
+
@ie.readyState == READYSTATE_COMPLETE do
|
30
33
|
sleep a_moment
|
31
34
|
end
|
32
35
|
sleep a_moment
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 2
|
9
|
+
version: 0.2.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jarmo Pertman
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-06-13 00:00:00 +03:00
|
18
18
|
default_executable: watirsplash
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -167,7 +167,7 @@ licenses: []
|
|
167
167
|
post_install_message: |-
|
168
168
|
*************************
|
169
169
|
|
170
|
-
Thank you for installing WatirSplash 0.2.
|
170
|
+
Thank you for installing WatirSplash 0.2.2! Don't forget to take a look at README and History files!
|
171
171
|
|
172
172
|
Execute "watirsplash generate" under your project's directory to generate default project structure.
|
173
173
|
|
@@ -202,7 +202,7 @@ rubyforge_project:
|
|
202
202
|
rubygems_version: 1.3.6
|
203
203
|
signing_key:
|
204
204
|
specification_version: 3
|
205
|
-
summary: watirsplash 0.2.
|
205
|
+
summary: watirsplash 0.2.2
|
206
206
|
test_files:
|
207
207
|
- spec/spec_helper_spec.rb
|
208
208
|
- spec/spec_match_array_spec.rb
|