watir 1.9.1 → 1.9.2.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +12 -1
- data/VERSION +1 -1
- data/lib/watir/element.rb +6 -17
- data/lib/watir/ie-class.rb +15 -13
- data/unittests/element_test.rb +1 -2
- data/watir.gemspec +1 -1
- metadata +25 -16
data/CHANGES
CHANGED
@@ -1,4 +1,15 @@
|
|
1
|
-
== Version 1.9.
|
1
|
+
== Version 1.9.2 - 2011/xx/xx
|
2
|
+
|
3
|
+
=== IE improvements
|
4
|
+
* Bump RAutomation dependency version to 0.6.2 to:
|
5
|
+
- fix/improve Watir::IE#send_keys.
|
6
|
+
- fix Watir::IE loading for certain Windows XP environments (http://jira.openqa.org/browse/WTR-484).
|
7
|
+
* Restored Watir::IE#autoit method to use RAutomation's AutoIt adapter with a deprecation warning.
|
8
|
+
* Cache IE.version result to not access registry with each execution - was causing slowness in TextField#set for example.
|
9
|
+
* Do not raise UnknownObjectException if parent element doesn't exist when calling Element#exists?
|
10
|
+
* Element#flash highlights elements again (http://jira.openqa.org/browse/WTR-478)
|
11
|
+
|
12
|
+
== Version 1.9.1 - 2011/06/30
|
2
13
|
|
3
14
|
* Bug fixes for IE9
|
4
15
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.9.
|
1
|
+
1.9.2.rc1
|
data/lib/watir/element.rb
CHANGED
@@ -211,25 +211,14 @@ module Watir
|
|
211
211
|
def highlight(set_or_clear)
|
212
212
|
if set_or_clear == :set
|
213
213
|
begin
|
214
|
-
|
215
|
-
|
216
|
-
ole_object.style.backgroundColor = @container.activeObjectHighLightColor
|
217
|
-
else
|
218
|
-
@original_color ||= style.backgroundColor
|
219
|
-
style.backgroundColor = @container.activeObjectHighLightColor
|
220
|
-
end
|
214
|
+
@original_color ||= ole_object.style.backgroundColor
|
215
|
+
ole_object.style.backgroundColor = @container.activeObjectHighLightColor
|
221
216
|
rescue
|
222
217
|
@original_color = nil
|
223
218
|
end
|
224
|
-
else
|
219
|
+
else
|
225
220
|
begin
|
226
|
-
|
227
|
-
if IE.version_parts[0].to_i >= 9
|
228
|
-
ole_object.style.backgroundColor = @original_color
|
229
|
-
else
|
230
|
-
style.backgroundColor = @original_color
|
231
|
-
end
|
232
|
-
end
|
221
|
+
ole_object.style.backgroundColor = @original_color if @original_color
|
233
222
|
rescue
|
234
223
|
# we could be here for a number of reasons...
|
235
224
|
# e.g. page may have reloaded and the reference is no longer valid
|
@@ -383,10 +372,10 @@ module Watir
|
|
383
372
|
def exists?
|
384
373
|
begin
|
385
374
|
locate if defined?(locate)
|
386
|
-
rescue WIN32OLERuntimeError
|
375
|
+
rescue WIN32OLERuntimeError, UnknownObjectException
|
387
376
|
@o = nil
|
388
377
|
end
|
389
|
-
|
378
|
+
!!@o
|
390
379
|
end
|
391
380
|
|
392
381
|
alias :exist? :exists?
|
data/lib/watir/ie-class.rb
CHANGED
@@ -250,13 +250,13 @@ module Watir
|
|
250
250
|
end
|
251
251
|
|
252
252
|
def self.version
|
253
|
-
begin
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
253
|
+
@ie_version ||= begin
|
254
|
+
require 'win32/registry'
|
255
|
+
::Win32::Registry::HKEY_LOCAL_MACHINE.open("SOFTWARE\\Microsoft\\Internet Explorer") do |ie_key|
|
256
|
+
ie_key.read('Version').last
|
257
|
+
end
|
258
|
+
# OR: ::WIN32OLE.new("WScript.Shell").RegRead("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Internet Explorer\\Version")
|
259
|
+
end
|
260
260
|
end
|
261
261
|
|
262
262
|
def self.version_parts
|
@@ -461,16 +461,18 @@ module Watir
|
|
461
461
|
end
|
462
462
|
|
463
463
|
def autoit
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
'Please refer to https://github.com/jarmo/RAutomation'
|
464
|
+
Kernel.warn "Usage of Watir::IE#autoit method is DEPRECATED! Use Watir::IE#rautomation method instead. Refer to https://github.com/jarmo/RAutomation for updating your scripts."
|
465
|
+
@autoit ||= ::RAutomation::Window.new(:hwnd => hwnd, :adapter => :autoit)
|
466
|
+
@autoit
|
468
467
|
end
|
469
468
|
|
470
469
|
# Activates the window and sends keys to it.
|
471
470
|
#
|
472
|
-
#
|
473
|
-
#
|
471
|
+
# Example:
|
472
|
+
# browser.send_keys("Hello World{enter}")
|
473
|
+
#
|
474
|
+
# Refer to RAutomation::Adapter::WinFfi::KeystrokeConverter.convert_special_characters for
|
475
|
+
# special characters conversion.
|
474
476
|
# @see RAutomation::Window#send_keys
|
475
477
|
def send_keys(key_string)
|
476
478
|
rautomation.send_keys key_string
|
data/unittests/element_test.rb
CHANGED
data/watir.gemspec
CHANGED
@@ -40,7 +40,7 @@ spec = Gem::Specification.new do |s|
|
|
40
40
|
s.add_dependency 'firewatir', '= ' + version
|
41
41
|
s.add_dependency 'nokogiri'
|
42
42
|
s.add_dependency 'ffi', '~>1.0'
|
43
|
-
s.add_dependency 'rautomation', '~>0.
|
43
|
+
s.add_dependency 'rautomation', '~>0.6.2'
|
44
44
|
|
45
45
|
s.has_rdoc = true
|
46
46
|
s.rdoc_options += $WATIR_RDOC_OPTIONS
|
metadata
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 15424183
|
5
|
+
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 9
|
9
|
+
- 2
|
10
|
+
- rc
|
9
11
|
- 1
|
10
|
-
version: 1.9.
|
12
|
+
version: 1.9.2.rc1
|
11
13
|
platform: ruby
|
12
14
|
authors:
|
13
15
|
- Bret Pettichord
|
@@ -15,7 +17,7 @@ autorequire:
|
|
15
17
|
bindir: bin
|
16
18
|
cert_chain: []
|
17
19
|
|
18
|
-
date: 2011-
|
20
|
+
date: 2011-07-09 00:00:00 Z
|
19
21
|
dependencies:
|
20
22
|
- !ruby/object:Gem::Dependency
|
21
23
|
name: win32-process
|
@@ -57,12 +59,14 @@ dependencies:
|
|
57
59
|
requirements:
|
58
60
|
- - "="
|
59
61
|
- !ruby/object:Gem::Version
|
60
|
-
hash:
|
62
|
+
hash: 15424183
|
61
63
|
segments:
|
62
64
|
- 1
|
63
65
|
- 9
|
66
|
+
- 2
|
67
|
+
- rc
|
64
68
|
- 1
|
65
|
-
version: 1.9.
|
69
|
+
version: 1.9.2.rc1
|
66
70
|
type: :runtime
|
67
71
|
version_requirements: *id003
|
68
72
|
- !ruby/object:Gem::Dependency
|
@@ -73,12 +77,14 @@ dependencies:
|
|
73
77
|
requirements:
|
74
78
|
- - "="
|
75
79
|
- !ruby/object:Gem::Version
|
76
|
-
hash:
|
80
|
+
hash: 15424183
|
77
81
|
segments:
|
78
82
|
- 1
|
79
83
|
- 9
|
84
|
+
- 2
|
85
|
+
- rc
|
80
86
|
- 1
|
81
|
-
version: 1.9.
|
87
|
+
version: 1.9.2.rc1
|
82
88
|
type: :runtime
|
83
89
|
version_requirements: *id004
|
84
90
|
- !ruby/object:Gem::Dependency
|
@@ -118,11 +124,12 @@ dependencies:
|
|
118
124
|
requirements:
|
119
125
|
- - ~>
|
120
126
|
- !ruby/object:Gem::Version
|
121
|
-
hash:
|
127
|
+
hash: 3
|
122
128
|
segments:
|
123
129
|
- 0
|
124
|
-
-
|
125
|
-
|
130
|
+
- 6
|
131
|
+
- 2
|
132
|
+
version: 0.6.2
|
126
133
|
type: :runtime
|
127
134
|
version_requirements: *id007
|
128
135
|
description: " WATIR is \"Web Application Testing in Ruby\". Watir (pronounced water) is a free,\n open-source functional testing tool for automating browser-based tests of web applications.\n It works with applications written in any language.\n Watir drives the Internet Explorer browser the same way an end user would.\n It clicks links, fills in forms, presses buttons.\n Watir also checks results, such as whether expected text appears on the\n page, or whether a control is enabled.\n Watir can test web applications written in any language.\n Watir is a Ruby library that works with Internet Explorer on Windows.\n"
|
@@ -352,16 +359,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
352
359
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
353
360
|
none: false
|
354
361
|
requirements:
|
355
|
-
- - "
|
362
|
+
- - ">"
|
356
363
|
- !ruby/object:Gem::Version
|
357
|
-
hash:
|
364
|
+
hash: 25
|
358
365
|
segments:
|
359
|
-
-
|
360
|
-
|
366
|
+
- 1
|
367
|
+
- 3
|
368
|
+
- 1
|
369
|
+
version: 1.3.1
|
361
370
|
requirements:
|
362
371
|
- Microsoft Windows running Internet Explorer 5.5 or later.
|
363
372
|
rubyforge_project: Watir
|
364
|
-
rubygems_version: 1.
|
373
|
+
rubygems_version: 1.8.4
|
365
374
|
signing_key:
|
366
375
|
specification_version: 3
|
367
376
|
summary: Automated testing tool for web applications.
|