watir 1.9.0.rc3 → 1.9.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.9.0.rc3
1
+ 1.9.0.rc4
@@ -3,11 +3,8 @@ module Watir
3
3
  class JavascriptDialog
4
4
  WINDOW_TITLES = ['Message from webpage', 'Windows Internet Explorer','Microsoft Internet Explorer']
5
5
 
6
- attr_accessor :timeout
7
-
8
6
  def initialize(opts={})
9
7
  @opts = opts
10
- @timeout = 30
11
8
  end
12
9
 
13
10
  def exists?
@@ -27,15 +24,7 @@ module Watir
27
24
  end
28
25
 
29
26
  def javascript_dialog_window
30
- return @window if @window
31
- begin
32
- original_timeout = RAutomation::Window.wait_timeout
33
- RAutomation::Window.wait_timeout = @timeout
34
- @window = ::RAutomation::Window.new(:title => @opts[:title] || /^(#{WINDOW_TITLES.join('|')})$/)
35
- ensure
36
- RAutomation::Window.wait_timeout = original_timeout
37
- end
38
- @window
27
+ @window ||= ::RAutomation::Window.new(:title => @opts[:title] || /^(#{WINDOW_TITLES.join('|')})$/)
39
28
  end
40
29
 
41
30
  end
@@ -19,7 +19,10 @@ class TC_Dialog_Test < Test::Unit::TestCase
19
19
 
20
20
  def test_button_name_not_found
21
21
  browser.button(:id, 'btnAlert').click_no_wait
22
+ original_timeout = RAutomation::Window.wait_timeout
23
+ RAutomation::Window.wait_timeout = 5
22
24
  assert_raises(::RAutomation::UnknownButtonException) {browser.javascript_dialog.button("Yes").click}
25
+ RAutomation::Window.wait_timeout = original_timeout
23
26
  browser.javascript_dialog.button("OK").click
24
27
  end
25
28
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15424163
4
+ hash: 15424173
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 1
8
8
  - 9
9
9
  - 0
10
10
  - rc
11
- - 3
12
- version: 1.9.0.rc3
11
+ - 4
12
+ version: 1.9.0.rc4
13
13
  platform: ruby
14
14
  authors:
15
15
  - Bret Pettichord
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-06-06 00:00:00 Z
20
+ date: 2011-06-07 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: win32-process
@@ -59,14 +59,14 @@ dependencies:
59
59
  requirements:
60
60
  - - "="
61
61
  - !ruby/object:Gem::Version
62
- hash: 15424163
62
+ hash: 15424173
63
63
  segments:
64
64
  - 1
65
65
  - 9
66
66
  - 0
67
67
  - rc
68
- - 3
69
- version: 1.9.0.rc3
68
+ - 4
69
+ version: 1.9.0.rc4
70
70
  type: :runtime
71
71
  version_requirements: *id003
72
72
  - !ruby/object:Gem::Dependency
@@ -77,14 +77,14 @@ dependencies:
77
77
  requirements:
78
78
  - - "="
79
79
  - !ruby/object:Gem::Version
80
- hash: 15424163
80
+ hash: 15424173
81
81
  segments:
82
82
  - 1
83
83
  - 9
84
84
  - 0
85
85
  - rc
86
- - 3
87
- version: 1.9.0.rc3
86
+ - 4
87
+ version: 1.9.0.rc4
88
88
  type: :runtime
89
89
  version_requirements: *id004
90
90
  - !ruby/object:Gem::Dependency