watir-classic 3.1.0 → 3.2.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,9 @@
1
+ == 3.2.0 - 2012/09/17
2
+
3
+ * Add Element#browser method as an alias for Element#page_container.
4
+ * Fix SelectList#{select|clear} to fire onChange events for <select> element.
5
+ * Watir::Browser is now a class and not a module - beware if you're monkey-patching.
6
+
1
7
  == 3.1.0 - 2012/08/20
2
8
 
3
9
  * Add Browser#name, which returns :ie.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- watir-classic (3.0.0)
4
+ watir-classic (3.1.0)
5
5
  ffi (~> 1.0)
6
6
  nokogiri
7
7
  rautomation (~> 0.7.2)
@@ -19,7 +19,7 @@ GEM
19
19
  ffi (~> 1.0, >= 1.0.6)
20
20
  diff-lcs (1.1.3)
21
21
  ffi (1.1.3-x86-mingw32)
22
- hoe (3.0.6)
22
+ hoe (3.0.8)
23
23
  rake (~> 0.8)
24
24
  mini_magick (3.2.1)
25
25
  subexec (~> 0.0.4)
@@ -51,8 +51,8 @@ GEM
51
51
  s4t-utils (>= 1.0.3)
52
52
  xml-simple (>= 1.0.11)
53
53
  win32-api (1.4.8-x86-mingw32)
54
- win32-process (0.6.6)
55
- windows-pr (>= 1.2.2)
54
+ win32-process (0.7.0)
55
+ ffi (>= 1.0.0)
56
56
  win32screenshot (1.0.7)
57
57
  ffi (~> 1.0)
58
58
  mini_magick (~> 3.2.1)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.0
1
+ 3.2.0.rc1
@@ -51,7 +51,7 @@ before you invoke Browser.new.
51
51
 
52
52
  =end rdoc
53
53
 
54
- module Browser
54
+ class Browser
55
55
  @@browser_classes = {}
56
56
  @@sub_options = {}
57
57
  @@default = nil
@@ -30,6 +30,7 @@ module Watir
30
30
  attr_accessor :activeObjectHighLightColor
31
31
  # The PageContainer object containing this element
32
32
  attr_accessor :page_container
33
+ alias_method :browser, :page_container
33
34
 
34
35
  def copy_test_config(container) # only used by form and frame
35
36
  @typingspeed = container.typingspeed
@@ -25,7 +25,7 @@ module Watir
25
25
  # This method clears the selected items in the select box
26
26
  def clear
27
27
  perform_action do
28
- options.each {|option| option.clear}
28
+ options.each(&:clear)
29
29
  end
30
30
  end
31
31
 
@@ -94,11 +94,7 @@ module Watir
94
94
 
95
95
  def select
96
96
  perform_action do
97
- unless selected?
98
- ole_object.selected = true
99
- select_list.dispatch_event("onChange")
100
- @container.wait
101
- end
97
+ change_selected true unless selected?
102
98
  end
103
99
  end
104
100
 
@@ -106,11 +102,7 @@ module Watir
106
102
  raise TypeError, "you can only clear multi-selects" unless select_list.multiple?
107
103
 
108
104
  perform_action do
109
- if selected?
110
- ole_object.selected = false
111
- select_list.dispatch_event("onChange")
112
- @container.wait
113
- end
105
+ change_selected false if selected?
114
106
  end
115
107
  end
116
108
 
@@ -134,6 +126,13 @@ module Watir
134
126
  raise "SELECT element was not found for #{self}!" unless el
135
127
  @select_list = el
136
128
  end
129
+
130
+ def change_selected(value)
131
+ select_list.focus
132
+ ole_object.selected = value
133
+ select_list.dispatch_event("onChange")
134
+ @container.wait
135
+ end
137
136
  end
138
137
 
139
138
  #
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir-classic
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
5
- prerelease:
4
+ version: 3.2.0.rc1
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Bret Pettichord
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-20 00:00:00.000000000 Z
12
+ date: 2012-09-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: win32-process
@@ -321,9 +321,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
321
321
  required_rubygems_version: !ruby/object:Gem::Requirement
322
322
  none: false
323
323
  requirements:
324
- - - ! '>='
324
+ - - ! '>'
325
325
  - !ruby/object:Gem::Version
326
- version: '0'
326
+ version: 1.3.1
327
327
  requirements:
328
328
  - Microsoft Windows running Internet Explorer 5.5 or later.
329
329
  rubyforge_project: