bewildr 0.1.3 → 0.1.4
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/Rakefile +3 -3
- data/lib/bewildr/control_patterns/grid_pattern.rb +2 -2
- data/lib/bewildr/control_patterns/range_value_pattern.rb +3 -3
- data/lib/bewildr/control_patterns/selection_item_pattern.rb +2 -6
- data/lib/bewildr/control_patterns/text_pattern.rb +1 -1
- data/lib/bewildr/control_patterns/value_pattern.rb +2 -2
- metadata +5 -5
data/Rakefile
CHANGED
@@ -10,14 +10,14 @@ require 'cucumber/rake/task'
|
|
10
10
|
|
11
11
|
spec = Gem::Specification.new do |s|
|
12
12
|
s.name = 'bewildr'
|
13
|
-
s.version = '0.1.
|
13
|
+
s.version = '0.1.4'
|
14
14
|
s.has_rdoc = true
|
15
15
|
s.extra_rdoc_files = ['README.rdoc', 'LICENSE']
|
16
16
|
s.summary = 'Test WPF UI apps with (iron) ruby!'
|
17
17
|
s.description = s.summary
|
18
18
|
s.author = 'Nat Ritmeyer'
|
19
19
|
s.email = 'nat@natontesting.com'
|
20
|
-
s.homepage = 'http://
|
20
|
+
s.homepage = 'http://www.bewildr.info'
|
21
21
|
s.files = %w(LICENSE README.rdoc Rakefile) + Dir.glob("{bin,lib}/**/*")
|
22
22
|
s.require_path = "lib"
|
23
23
|
s.bindir = "bin"
|
@@ -49,4 +49,4 @@ end
|
|
49
49
|
|
50
50
|
Cucumber::Rake::Task.new(:features) do |t|
|
51
51
|
t.cucumber_opts = "--format pretty -q"
|
52
|
-
end
|
52
|
+
end
|
@@ -4,11 +4,11 @@ module Bewildr
|
|
4
4
|
module ControlPatterns
|
5
5
|
module GridPattern
|
6
6
|
def row_count
|
7
|
-
@automation_element.get_current_pattern(System::Windows::Automation::GridPattern.pattern).current.row_count
|
7
|
+
@automation_element.get_current_pattern(System::Windows::Automation::GridPattern.pattern).current.row_count.to_i
|
8
8
|
end
|
9
9
|
|
10
10
|
def column_count
|
11
|
-
@automation_element.get_current_pattern(System::Windows::Automation::GridPattern.pattern).current.column_count
|
11
|
+
@automation_element.get_current_pattern(System::Windows::Automation::GridPattern.pattern).current.column_count.to_i
|
12
12
|
end
|
13
13
|
|
14
14
|
def get_item(row, column)
|
@@ -4,7 +4,7 @@ module Bewildr
|
|
4
4
|
module ControlPatterns
|
5
5
|
module RangeValuePattern
|
6
6
|
def value
|
7
|
-
@automation_element.get_current_pattern(System::Windows::Automation::RangeValuePattern.pattern).current.value
|
7
|
+
@automation_element.get_current_pattern(System::Windows::Automation::RangeValuePattern.pattern).current.value.to_f
|
8
8
|
end
|
9
9
|
|
10
10
|
def value=(input)
|
@@ -12,11 +12,11 @@ module Bewildr
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def maximum
|
15
|
-
@automation_element.get_current_pattern(System::Windows::Automation::RangeValuePattern.pattern).current.maximum
|
15
|
+
@automation_element.get_current_pattern(System::Windows::Automation::RangeValuePattern.pattern).current.maximum.to_f
|
16
16
|
end
|
17
17
|
|
18
18
|
def minimum
|
19
|
-
@automation_element.get_current_pattern(System::Windows::Automation::RangeValuePattern.pattern).current.minimum
|
19
|
+
@automation_element.get_current_pattern(System::Windows::Automation::RangeValuePattern.pattern).current.minimum.to_f
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -8,16 +8,12 @@ module Bewildr
|
|
8
8
|
@automation_element.get_current_pattern(System::Windows::Automation::SelectionItemPattern.pattern).select
|
9
9
|
end
|
10
10
|
|
11
|
-
def is_selected?
|
12
|
-
@automation_element.get_current_pattern(System::Windows::Automation::SelectionItemPattern.pattern).current.is_selected
|
13
|
-
end
|
14
|
-
|
15
11
|
def selected?
|
16
|
-
is_selected
|
12
|
+
@automation_element.get_current_pattern(System::Windows::Automation::SelectionItemPattern.pattern).current.is_selected
|
17
13
|
end
|
18
14
|
|
19
15
|
def unselected?
|
20
|
-
!
|
16
|
+
!selected?
|
21
17
|
end
|
22
18
|
end
|
23
19
|
end
|
@@ -8,7 +8,7 @@ module Bewildr
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def get_text
|
11
|
-
@automation_element.get_current_pattern(System::Windows::Automation::TextPattern.pattern).document_range.get_text(-1)
|
11
|
+
@automation_element.get_current_pattern(System::Windows::Automation::TextPattern.pattern).document_range.get_text(-1).to_s
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -3,12 +3,12 @@
|
|
3
3
|
module Bewildr
|
4
4
|
module ControlPatterns
|
5
5
|
module ValuePattern
|
6
|
-
def
|
6
|
+
def password_field?
|
7
7
|
@automation_element.current.class_name.to_s == "PasswordBox" ? true : false
|
8
8
|
end
|
9
9
|
|
10
10
|
def text
|
11
|
-
raise Bewildr::PasswordFieldReadAttempt, "You can't get the text of a password field" if
|
11
|
+
raise Bewildr::PasswordFieldReadAttempt, "You can't get the text of a password field" if password_field?
|
12
12
|
@automation_element.get_current_pattern(System::Windows::Automation::ValuePattern.pattern).current.value.to_s
|
13
13
|
end
|
14
14
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bewildr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nat Ritmeyer
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-07-
|
18
|
+
date: 2010-07-11 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -65,7 +65,7 @@ files:
|
|
65
65
|
- lib/bewildr/windows.rb
|
66
66
|
- lib/bewildr.rb
|
67
67
|
has_rdoc: true
|
68
|
-
homepage: http://
|
68
|
+
homepage: http://www.bewildr.info
|
69
69
|
licenses: []
|
70
70
|
|
71
71
|
post_install_message:
|