watir-classic 3.5.0 → 3.6.0

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.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YjFhN2FkNjA3OWY3Y2NjM2ZiM2UwNGU3OWRhNWJmY2ViYThjMDc1Ng==
5
- data.tar.gz: !binary |-
6
- OTU2NmYzOWZkZmY2NGM5ZDgxOWVjZDUxZWZjYzhhYWU5MTZlN2VjNA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- ZTg1ODg2NjFjZTUyYzM2MGQxODhmYjY1NzkwOTVkNTRkNzY2MDNjYzUwYTRj
10
- ZjI4ZGJmNDA0MWFhMjk1YTI2ZDljNDkzMjVhNjUwMGQyOGJiODkwZWZiOWJl
11
- N2EyOWY4NTIzN2Q0OWJiYWEyY2MzNjcyNDU5Yjc4YjUzOTI2ZWQ=
12
- data.tar.gz: !binary |-
13
- OTYyNWQ2YjVkYjA4NWQyMjFlZWQwYWNiNDNjYjA2MWFhYWQ0M2VmNDE4YTI0
14
- ZTdhNzBlNGQ2MjY1MGE5ZTNhYmFmNjJmMTlkMDJjMjE4MjI1NzgwNjhjNTFi
15
- MjJmY2NlNzk0OTVlY2Y4YWQ5OTcyMDZjZTdlZWYzZmFjYmVjMDg=
2
+ SHA1:
3
+ metadata.gz: 3fade9f7ab5eddd5282759d5e6fad042ba20505a
4
+ data.tar.gz: b5877f740e2e7cba0702f02a6b168e3bbecc98f1
5
+ SHA512:
6
+ metadata.gz: 1556009c313738b71cfdeacfe325ebb5eb1a2a84eb29cf8a919f2852007118e2fd522657a7c3cfc4646571e481117df3aa3b9d349f1746f6f15ecdd2bd86d15d
7
+ data.tar.gz: 8ce619e8d51e9f190fdf58a0afaa51bbb366a461c88172e0a320dae9b240790ee7f22e900f745fc13b7702503354fa421e0a633c456f7b8830ea4f2d9d9e834d
data/CHANGES CHANGED
@@ -1,3 +1,11 @@
1
+ == 3.6.0 - 2013/03/16
2
+
3
+ * Add full support for Ruby 2.0 and IE10.
4
+ * Add support for modal dialogs on Ruby 2.0.
5
+ * Bump up nokogiri dependency for Ruby 2.0 support.
6
+ * Fix Browser#version for IE10.
7
+ * SelectList#select and SelectList#select_value return empty string when value is removed after selection.
8
+
1
9
  == 3.5.0 - 2013/03/10
2
10
 
3
11
  * Browser#name returns :internet_explorer instead of :ie.
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- watir-classic (3.4.0)
4
+ watir-classic (3.5.0)
5
5
  ffi (~> 1.0)
6
6
  multi_json
7
- nokogiri
7
+ nokogiri (= 1.5.7.rc3)
8
8
  rautomation (~> 0.7)
9
9
  user-choices
10
10
  win32-process (>= 0.5.5)
@@ -25,8 +25,7 @@ GEM
25
25
  mini_magick (3.5.0)
26
26
  subexec (~> 0.2.1)
27
27
  multi_json (1.6.1)
28
- nokogiri (1.5.6)
29
- nokogiri (1.5.6-x86-mingw32)
28
+ nokogiri (1.5.7.rc3-x86-mingw32)
30
29
  rack (1.5.2)
31
30
  rack-protection (1.4.0)
32
31
  rack
@@ -54,7 +53,6 @@ GEM
54
53
  builder (>= 2.1.2)
55
54
  s4t-utils (>= 1.0.3)
56
55
  xml-simple (>= 1.0.11)
57
- win32-api (1.4.8)
58
56
  win32-api (1.4.8-x86-mingw32)
59
57
  win32-process (0.7.1)
60
58
  ffi (>= 1.0.0)
data/README.rdoc CHANGED
@@ -69,3 +69,11 @@ Checking for text in a page
69
69
  Checking the title of a page
70
70
 
71
71
  puts browser.title == "Thanks!"
72
+
73
+ == Supported Platforms
74
+
75
+ Watir-Classic is supported on Ruby 1.8.7, 1.9.3 and 2.0.0. It should work on Internet Explorer 8, 9 and 10.
76
+
77
+ Let us know at {Watir's Mailing List}[https://groups.google.com/forum/?fromgroups#!forum/watir-general] or
78
+ through {Issues}[https://github.com/watir-classic-issues] if there's any problems.
79
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.5.0
1
+ 3.6.0
@@ -130,9 +130,12 @@ module Watir
130
130
  @ie_version ||= begin
131
131
  require 'win32/registry'
132
132
  ::Win32::Registry::HKEY_LOCAL_MACHINE.open("SOFTWARE\\Microsoft\\Internet Explorer") do |ie_key|
133
- ie_key.read('Version').last
133
+ begin
134
+ ie_key['svcVersion']
135
+ rescue ::Win32::Registry::Error
136
+ ie_key['Version']
137
+ end
134
138
  end
135
- # OR: ::WIN32OLE.new("WScript.Shell").RegRead("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Internet Explorer\\Version")
136
139
  end
137
140
  end
138
141
 
@@ -45,7 +45,7 @@ module Watir
45
45
  raise NoValueFoundException, "No option with :text, :label or :value of #{item.inspect} in this select element" if matching_options.empty?
46
46
  matching_options.each(&:select)
47
47
  end
48
- matching_options.first.text
48
+ first_present_option_value matching_options, :text
49
49
  end
50
50
 
51
51
  # Select an item or items in a select box by option's value.
@@ -58,7 +58,7 @@ module Watir
58
58
  matching_options = matching_items_in_select_list(:value, item)
59
59
  raise NoValueFoundException, "No option with :value of #{item.inspect} in this select element" if matching_options.empty?
60
60
  matching_options.each(&:select)
61
- matching_options.first.value
61
+ first_present_option_value matching_options, :value
62
62
  end
63
63
 
64
64
  # @example Retrieve selected options as a text:
@@ -100,6 +100,11 @@ module Watir
100
100
  end
101
101
  end
102
102
  end
103
+
104
+ def first_present_option_value(matching_options, field_to_return)
105
+ first_matching_option = matching_options.first
106
+ first_matching_option.present? ? first_matching_option.send(field_to_return) : ""
107
+ end
103
108
  end
104
109
 
105
110
  # Returned by {Container#option}.
@@ -3,9 +3,11 @@
3
3
  # Use our modified win32ole library
4
4
 
5
5
  if RUBY_VERSION =~ /^1\.8/
6
- $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), '..', 'watir-classic', 'win32ole', '1.8.7'))
6
+ $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), '..', 'watir-classic', 'win32ole', '1.8.7'))
7
7
  elsif RUBY_VERSION =~ /^1\.9/
8
- $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), '..', 'watir-classic', 'win32ole', '1.9.3'))
8
+ $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), '..', 'watir-classic', 'win32ole', '1.9.3'))
9
+ elsif RUBY_VERSION =~ /^2\.0/
10
+ $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), '..', 'watir-classic', 'win32ole', '2.0.0'))
9
11
  else
10
12
  # loading win32ole from stdlib
11
13
  end
@@ -0,0 +1,50 @@
1
+ --- win32ole.c 2013-01-25 12:17:59 +0200
2
+ +++ win32ole.c.patched 2013-03-14 22:51:33 +0200
3
+ @@ -9076,6 +9076,39 @@
4
+ st_free_table(enc2cp_table);
5
+ }
6
+
7
+ +/*
8
+ + * WIN32OLE.connect_unknown( pUnknown ) --> aWIN32OLE
9
+ + * ----
10
+ + * Returns running OLE Automation object or WIN32OLE object from an IUnknown pointer
11
+ + * the IUnknown pointer is passed in as a FIXNUM
12
+ + */
13
+ +static VALUE
14
+ +fole_s_connect_unknown(VALUE self, VALUE iUnknown)
15
+ +{
16
+ + HRESULT hr;
17
+ + IDispatch *pDispatch;
18
+ + IUnknown *pUnknown;
19
+ +
20
+ + /* initialize to use OLE */
21
+ + ole_initialize();
22
+ +
23
+ + //cast from int to IUnknown*
24
+ + pUnknown = (IUnknown*)FIX2INT(iUnknown);
25
+ +
26
+ + hr = pUnknown->lpVtbl->QueryInterface(pUnknown, &IID_IDispatch,
27
+ + (void **)&pDispatch);
28
+ + if(FAILED(hr)) {
29
+ + OLE_RELEASE(pUnknown);
30
+ + ole_raise(hr, eWIN32OLERuntimeError,
31
+ + "Failed to connect to WIN32OLE server `%d'",
32
+ + FIX2INT(iUnknown));
33
+ + }
34
+ +
35
+ + OLE_RELEASE(pUnknown);
36
+ +
37
+ + return create_win32ole_object(self, pDispatch, 0,0);
38
+ +}
39
+ +
40
+ void
41
+ Init_win32ole(void)
42
+ {
43
+ @@ -9109,6 +9142,7 @@
44
+ rb_define_method(cWIN32OLE, "initialize", fole_initialize, -1);
45
+
46
+ rb_define_singleton_method(cWIN32OLE, "connect", fole_s_connect, -1);
47
+ + rb_define_singleton_method(cWIN32OLE, "connect_unknown", fole_s_connect_unknown, 1);
48
+ rb_define_singleton_method(cWIN32OLE, "const_load", fole_s_const_load, -1);
49
+
50
+ rb_define_singleton_method(cWIN32OLE, "ole_free", fole_s_free, 1);
@@ -5,7 +5,7 @@ Compiling win32ole (Ruby 1.8.7 +)
5
5
  (2) Download and install the Ruby DevKit: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
6
6
  (3) Check out the source code: http://www.ruby-lang.org/en/community/ruby-core/
7
7
  (4) Go to the directory where you installded the DevKit and run devkitvars.bat
8
- (5) Go into the ruby source tree: ruby/etc/win32ole
8
+ (5) Go into the ruby source tree: ext/win32ole
9
9
  (6) Make sure you can build without the patch
10
10
  (a) Run: 'ruby extconf.rb'
11
11
  (b) Run: 'make'
@@ -4,7 +4,7 @@ require "watir-classic"
4
4
  WatirSpec.implementation do |imp|
5
5
  imp.name = :watir_classic
6
6
 
7
- WatirSpec.persistent_browser = false
7
+ WatirSpec.persistent_browser = true
8
8
  imp.browser_class = Watir::IE
9
9
  browser = :internet_explorer
10
10
  browser_version = "#{browser}#{imp.browser_class.version.to_i}".to_sym
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
25
25
 
26
26
  s.add_dependency 'win32-process', '>= 0.5.5'
27
27
  s.add_dependency 'windows-pr', '>= 0.6.6'
28
- s.add_dependency 'nokogiri'
28
+ s.add_dependency 'nokogiri', ">= 1.5.7.rc3"
29
29
  s.add_dependency 'ffi', '~>1.0'
30
30
  s.add_dependency 'rautomation', '~>0.7'
31
31
  s.add_dependency 'user-choices'
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir-classic
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bret Pettichord
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-10 00:00:00.000000000 Z
11
+ date: 2013-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: win32-process
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.5.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.5.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: windows-pr
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.6.6
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.6.6
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: nokogiri
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 1.5.7.rc3
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 1.5.7.rc3
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: ffi
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -84,42 +84,42 @@ dependencies:
84
84
  name: user-choices
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ! '>='
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: multi_json
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ! '>='
101
+ - - '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ! '>='
108
+ - - '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: win32screenshot
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ! '>='
115
+ - - '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ! '>='
122
+ - - '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
@@ -140,66 +140,68 @@ dependencies:
140
140
  name: syntax
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ! '>='
143
+ - - '>='
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ! '>='
150
+ - - '>='
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: yard
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ! '>='
157
+ - - '>='
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ! '>='
164
+ - - '>='
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: sinatra
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ! '>='
171
+ - - '>='
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ! '>='
178
+ - - '>='
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: childprocess
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ! '>='
185
+ - - '>='
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ! '>='
192
+ - - '>='
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
- description: ! " WATIR is \"Web Application Testing in Ruby\". Watir (pronounced
196
- water) is a free,\n open-source functional testing tool for automating browser-based
197
- tests of web applications.\n It works with applications written in any language.\n
198
- \ Watir drives the Internet Explorer browser the same way an end user would.\n
199
- \ It clicks links, fills in forms, presses buttons.\n Watir also checks results,
200
- such as whether expected text appears on the\n page, or whether a control is
201
- enabled.\n Watir can test web applications written in any language.\n Watir
202
- is a Ruby library that works with Internet Explorer on Windows.\n"
195
+ description: |2
196
+ WATIR is "Web Application Testing in Ruby". Watir (pronounced water) is a free,
197
+ open-source functional testing tool for automating browser-based tests of web applications.
198
+ It works with applications written in any language.
199
+ Watir drives the Internet Explorer browser the same way an end user would.
200
+ It clicks links, fills in forms, presses buttons.
201
+ Watir also checks results, such as whether expected text appears on the
202
+ page, or whether a control is enabled.
203
+ Watir can test web applications written in any language.
204
+ Watir is a Ruby library that works with Internet Explorer on Windows.
203
205
  email: watir-general@groups.google.com
204
206
  executables: []
205
207
  extensions: []
@@ -267,6 +269,8 @@ files:
267
269
  - lib/watir-classic/win32ole/1.8.7/win32ole.so
268
270
  - lib/watir-classic/win32ole/1.9.3/win32ole.patch
269
271
  - lib/watir-classic/win32ole/1.9.3/win32ole.so
272
+ - lib/watir-classic/win32ole/2.0.0/win32ole.patch
273
+ - lib/watir-classic/win32ole/2.0.0/win32ole.so
270
274
  - lib/watir-classic/win32ole/build_notes.txt
271
275
  - lib/watir-classic/win32ole/history.txt
272
276
  - lib/watir-classic/window.rb
@@ -289,18 +293,18 @@ require_paths:
289
293
  - lib
290
294
  required_ruby_version: !ruby/object:Gem::Requirement
291
295
  requirements:
292
- - - ! '>='
296
+ - - '>='
293
297
  - !ruby/object:Gem::Version
294
298
  version: '0'
295
299
  required_rubygems_version: !ruby/object:Gem::Requirement
296
300
  requirements:
297
- - - ! '>='
301
+ - - '>='
298
302
  - !ruby/object:Gem::Version
299
303
  version: '0'
300
304
  requirements:
301
305
  - Microsoft Windows running Internet Explorer 5.5 or later.
302
306
  rubyforge_project:
303
- rubygems_version: 2.0.0
307
+ rubygems_version: 2.0.3
304
308
  signing_key:
305
309
  specification_version: 4
306
310
  summary: Automated testing tool for web applications.