bewildr 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
@@ -13,12 +13,13 @@ module Bewildr
|
|
13
13
|
item_array.to_a.collect {|item| Bewildr::Element.new(item)}
|
14
14
|
end
|
15
15
|
|
16
|
-
def
|
16
|
+
def multi_selectable?
|
17
17
|
@automation_element.get_current_pattern(System::Windows::Automation::SelectionPattern.pattern).current.can_select_multiple
|
18
18
|
end
|
19
|
+
alias :can_select_multiple? :multi_selectable?
|
19
20
|
|
20
21
|
def selected
|
21
|
-
|
22
|
+
multi_selectable? ? get_selection : get_selection.first
|
22
23
|
end
|
23
24
|
end
|
24
25
|
end
|
data/lib/bewildr/control_type.rb
CHANGED
@@ -8,7 +8,7 @@ module Bewildr
|
|
8
8
|
@@control_type_map.index(input_control_type_enum)
|
9
9
|
end
|
10
10
|
|
11
|
-
def
|
11
|
+
def enum_for_symbol(input_symbol)
|
12
12
|
raise "Unknown control type: #{input_symbol}" unless @@control_type_map.key?(input_symbol)
|
13
13
|
@@control_type_map[input_symbol]
|
14
14
|
end
|
data/lib/bewildr/element.rb
CHANGED
data/lib/bewildr/finder.rb
CHANGED
@@ -58,7 +58,7 @@ module Bewildr
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def type_condition(condition_hash)
|
61
|
-
value = Bewildr::ControlType.
|
61
|
+
value = Bewildr::ControlType.enum_for_symbol(condition_hash[:type])
|
62
62
|
System::Windows::Automation::PropertyCondition.new(System::Windows::Automation::AutomationElement.control_type_property, value)
|
63
63
|
end
|
64
64
|
end
|
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: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 8
|
10
|
+
version: 0.1.8
|
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-
|
18
|
+
date: 2010-12-08 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -36,7 +36,6 @@ files:
|
|
36
36
|
- lib/bewildr/bewildr_helpers.rb
|
37
37
|
- lib/bewildr/control_patterns/expand_collapse_pattern.rb
|
38
38
|
- lib/bewildr/control_patterns/grid_pattern.rb
|
39
|
-
- lib/bewildr/control_patterns/invoke_pattern.rb
|
40
39
|
- lib/bewildr/control_patterns/range_value_pattern.rb
|
41
40
|
- lib/bewildr/control_patterns/scroll_pattern.rb
|
42
41
|
- lib/bewildr/control_patterns/selection_item_pattern.rb
|
@@ -1,11 +0,0 @@
|
|
1
|
-
#Copyright (c) 2010, Nathaniel Ritmeyer. All rights reserved.
|
2
|
-
|
3
|
-
#module Bewildr
|
4
|
-
# module ControlPatterns
|
5
|
-
# module InvokePattern
|
6
|
-
# def click
|
7
|
-
# @automation_element.get_current_pattern(System::Windows::Automation::InvokePattern.pattern).invoke
|
8
|
-
# end
|
9
|
-
# end
|
10
|
-
# end
|
11
|
-
#end
|