rautomation 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +3 -3
- data/History.rdoc +17 -0
- data/README.rdoc +2 -1
- data/Rakefile +23 -6
- data/VERSION +1 -1
- data/ext/IAccessibleDLL/Release/IAccessibleDLL.dll +0 -0
- data/ext/UiaDll/Release/UiaDll.dll +0 -0
- data/ext/UiaDll/UiaDll/{AutomatedComboBox.cpp → AutomatedSelectList.cpp} +22 -11
- data/ext/UiaDll/UiaDll/{AutomatedComboBox.h → AutomatedSelectList.h} +17 -4
- data/ext/UiaDll/UiaDll/AutomatedTable.cpp +55 -13
- data/ext/UiaDll/UiaDll/AutomatedTable.h +16 -3
- data/ext/UiaDll/UiaDll/AutomationControl.cpp +28 -0
- data/ext/UiaDll/UiaDll/AutomationControl.h +56 -0
- data/ext/UiaDll/UiaDll/AutomationFinder.cpp +57 -0
- data/ext/UiaDll/UiaDll/AutomationFinder.h +48 -0
- data/ext/UiaDll/UiaDll/ControlMethods.cpp +15 -0
- data/ext/UiaDll/UiaDll/MenuItemSelector.h +2 -0
- data/ext/UiaDll/UiaDll/MenuMethods.cpp +58 -0
- data/ext/UiaDll/UiaDll/SelectListMethods.cpp +37 -0
- data/ext/UiaDll/UiaDll/SelectionItem.cpp +10 -0
- data/ext/UiaDll/UiaDll/SelectionItem.h +21 -0
- data/ext/UiaDll/UiaDll/StringHelper.cpp +33 -2
- data/ext/UiaDll/UiaDll/StringHelper.h +6 -0
- data/ext/UiaDll/UiaDll/StringMethods.cpp +8 -0
- data/ext/UiaDll/UiaDll/TableMethods.cpp +76 -0
- data/ext/UiaDll/UiaDll/Toggle.cpp +2 -0
- data/ext/UiaDll/UiaDll/Toggle.h +22 -0
- data/ext/UiaDll/UiaDll/UiaDll.cpp +96 -327
- data/ext/UiaDll/UiaDll/UiaDll.vcxproj +15 -4
- data/ext/UiaDll/UiaDll/UiaDll.vcxproj.filters +91 -22
- data/ext/UiaDll/UiaDll/dllmain.cpp +1 -1
- data/ext/UiaDll/UiaDll/stdafx.h +38 -21
- data/ext/WindowsForms/Release/WindowsForms.exe +0 -0
- data/ext/WindowsForms/WindowsForms.sln +10 -0
- data/ext/WindowsForms/WindowsForms/AutomatableMonthCalendar.cs +59 -0
- data/ext/WindowsForms/WindowsForms/AutomationHelpers/AutomationProvider.cs +91 -0
- data/ext/WindowsForms/WindowsForms/MainFormWindow.Designer.cs +32 -10
- data/ext/WindowsForms/WindowsForms/MainFormWindow.cs +10 -0
- data/ext/WindowsForms/WindowsForms/WindowsForms.csproj +15 -6
- data/lib/rautomation/adapter/ms_uia.rb +1 -0
- data/lib/rautomation/adapter/ms_uia/checkbox.rb +2 -10
- data/lib/rautomation/adapter/ms_uia/constants.rb +1 -0
- data/lib/rautomation/adapter/ms_uia/control.rb +14 -67
- data/lib/rautomation/adapter/ms_uia/functions.rb +2 -18
- data/lib/rautomation/adapter/ms_uia/list_box.rb +5 -27
- data/lib/rautomation/adapter/ms_uia/list_item.rb +2 -29
- data/lib/rautomation/adapter/ms_uia/radio.rb +1 -1
- data/lib/rautomation/adapter/ms_uia/select_list.rb +5 -6
- data/lib/rautomation/adapter/ms_uia/table.rb +15 -50
- data/lib/rautomation/adapter/ms_uia/text_field.rb +1 -1
- data/lib/rautomation/adapter/ms_uia/uia_dll.rb +226 -58
- data/lib/rautomation/adapter/ms_uia/value_control.rb +21 -0
- data/lib/rautomation/adapter/ms_uia/window.rb +6 -104
- data/lib/rautomation/adapter/win_32/functions.rb +0 -23
- data/lib/rautomation/adapter/win_32/keys.rb +64 -61
- data/rautomation.gemspec +6 -1
- data/spec/adapter/autoit/mouse_spec.rb +1 -1
- data/spec/adapter/ms_uia/select_list_spec.rb +0 -21
- data/spec/adapter/ms_uia/table_spec.rb +13 -11
- data/spec/adapter/ms_uia/text_field_spec.rb +15 -8
- data/spec/adapter/ms_uia/value_control_spec.rb +11 -0
- data/spec/adapter/ms_uia/window_spec.rb +7 -1
- data/spec/adapter/win_32/mouse_spec.rb +1 -1
- data/spec/adapter/win_32/text_field_spec.rb +5 -5
- data/spec/adapter/win_32/window_spec.rb +1 -1
- data/spec/text_field_spec.rb +18 -23
- data/spec/window_spec.rb +1 -3
- metadata +45 -34
- data/ext/UiaDll/UiaDll/ToggleStateHelper.cpp +0 -33
@@ -1,24 +1,31 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe "MsUia::TextField", :if => SpecHelper.adapter == :ms_uia do
|
4
|
+
let(:main_form) { RAutomation::Window.new(:title => "MainFormWindow") }
|
4
5
|
|
5
6
|
it "check for text field class" do
|
6
|
-
|
7
|
-
|
7
|
+
main_form.text_field(:id => "checkBox").should_not exist
|
8
|
+
main_form.text_field(:id => "textField").should exist
|
8
9
|
end
|
9
10
|
|
10
11
|
it "enabled/disabled" do
|
11
|
-
|
12
|
-
|
12
|
+
main_form.text_field(:id => "textField").should be_enabled
|
13
|
+
main_form.text_field(:id => "textField").should_not be_disabled
|
13
14
|
|
14
|
-
|
15
|
-
|
15
|
+
main_form.text_field(:id => "textBoxDisabled").should_not be_enabled
|
16
|
+
main_form.text_field(:id => "textBoxDisabled").should be_disabled
|
16
17
|
end
|
17
18
|
|
18
19
|
it "cannot set a value to a disabled text field" do
|
19
|
-
lambda {
|
20
|
+
lambda { main_form.text_field(:id => "textBoxDisabled").set "abc" }.should raise_error
|
20
21
|
|
21
|
-
lambda {
|
22
|
+
lambda { main_form.text_field(:id => "textBoxDisabled").clear }.should raise_error
|
23
|
+
end
|
24
|
+
|
25
|
+
it "considers a document control type a text field as well" do
|
26
|
+
# cause the .NET framework to be loaded into the process (required to make this fail)
|
27
|
+
main_form.select_list(:id => "treeView").expand 0
|
28
|
+
main_form.text_field(:id => "multiLineTextField").should exist
|
22
29
|
end
|
23
30
|
|
24
31
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "MsUia::ValueControl", :if => SpecHelper.adapter == :ms_uia do
|
4
|
+
let(:window) { RAutomation::Window.new(:title => /MainFormWindow/) }
|
5
|
+
let(:value_control) { window.value_control(:id => "automatableMonthCalendar1") }
|
6
|
+
|
7
|
+
it "can set and get values" do
|
8
|
+
value_control.set "12/25/2012"
|
9
|
+
value_control.value.should eq("12/25/2012 12:00:00 AM")
|
10
|
+
end
|
11
|
+
end
|
@@ -27,7 +27,7 @@ describe "MsUia::Window", :if => SpecHelper.adapter == :ms_uia do
|
|
27
27
|
end
|
28
28
|
|
29
29
|
it "send arbitrary characters and control keys" do
|
30
|
-
text_field = window.text_field(:index =>
|
30
|
+
text_field = window.text_field(:index => 2)
|
31
31
|
text_field.focus
|
32
32
|
window.send_keys "abc123ABChiHI!"
|
33
33
|
text_field.value.should == "abc123ABChiHI!"
|
@@ -40,6 +40,12 @@ describe "MsUia::Window", :if => SpecHelper.adapter == :ms_uia do
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
+
context "#control" do
|
44
|
+
it "by name" do
|
45
|
+
window.control(:name => "checkBox").should exist
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
43
49
|
context "menu items" do
|
44
50
|
let(:about_box) { RAutomation::Window.new :title => "About" }
|
45
51
|
|
@@ -28,7 +28,7 @@ describe "Win32::Mouse", :if => SpecHelper.adapter == :win_32 do
|
|
28
28
|
window = RAutomation::Window.new(:title => "MainFormWindow")
|
29
29
|
window.maximize
|
30
30
|
|
31
|
-
text_field = window.text_field(:index =>
|
31
|
+
text_field = window.text_field(:index => 2)
|
32
32
|
text_field.set("start string")
|
33
33
|
text_field.value.should == "start string"
|
34
34
|
|
@@ -3,17 +3,17 @@ require 'spec_helper'
|
|
3
3
|
describe "Win32::TextField", :if => SpecHelper.adapter == :win_32 do
|
4
4
|
|
5
5
|
it "enabled/disabled" do
|
6
|
-
RAutomation::Window.new(:title => "MainFormWindow").text_field(:index =>
|
7
|
-
RAutomation::Window.new(:title => "MainFormWindow").text_field(:index =>
|
6
|
+
RAutomation::Window.new(:title => "MainFormWindow").text_field(:index => 2).should be_enabled
|
7
|
+
RAutomation::Window.new(:title => "MainFormWindow").text_field(:index => 2).should_not be_disabled
|
8
8
|
end
|
9
9
|
|
10
10
|
it "cannot set a value to a disabled text field" do
|
11
|
-
lambda { RAutomation::Window.new(:title => "MainFormWindow").text_field.set "abc" }.should raise_error
|
12
|
-
lambda { RAutomation::Window.new(:title => "MainFormWindow").text_field.clear }.should raise_error
|
11
|
+
lambda { RAutomation::Window.new(:title => "MainFormWindow").text_field(:index => 1).set "abc" }.should raise_error
|
12
|
+
lambda { RAutomation::Window.new(:title => "MainFormWindow").text_field(:index => 1).clear }.should raise_error
|
13
13
|
end
|
14
14
|
|
15
15
|
it "#send_keys" do
|
16
|
-
text_field = RAutomation::Window.new(:title => "MainFormWindow").text_field(:index =>
|
16
|
+
text_field = RAutomation::Window.new(:title => "MainFormWindow").text_field(:index => 2)
|
17
17
|
text_field.send_keys "abc"
|
18
18
|
text_field.value.should == "abc"
|
19
19
|
|
@@ -15,7 +15,7 @@ describe "Win32::Window", :if => SpecHelper.adapter == :win_32 do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
it "send arbitrary characters and control keys" do
|
18
|
-
text_field = window.text_field(:index =>
|
18
|
+
text_field = window.text_field(:index => 2)
|
19
19
|
text_field.focus
|
20
20
|
window.send_keys "abc123ABChiHI!"
|
21
21
|
text_field.value.should == "abc123ABChiHI!"
|
data/spec/text_field_spec.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RAutomation::TextField do
|
4
|
+
let(:main_form) { RAutomation::Window.new(:title => "MainFormWindow") }
|
5
|
+
let(:text_field) { main_form.text_field(:class => /Edit/i, :index => 2) }
|
6
|
+
|
4
7
|
it "#text_field" do
|
5
|
-
|
6
|
-
text_field(:class => /Edit/i, :index => 1).should exist
|
8
|
+
main_form.text_field(:class => /Edit/i, :index => 1).should exist
|
7
9
|
|
8
10
|
RAutomation::Window.wait_timeout = 0.1
|
9
11
|
expect { RAutomation::Window.new(:title => "non-existent-window").
|
@@ -12,53 +14,46 @@ describe RAutomation::TextField do
|
|
12
14
|
end
|
13
15
|
|
14
16
|
it "#set" do
|
15
|
-
|
16
|
-
window.text_field(:class => /Edit/i, :index => 1).set "hello!"
|
17
|
+
text_field.set "hello!"
|
17
18
|
|
18
19
|
RAutomation::Window.wait_timeout = 0.1
|
19
|
-
expect {
|
20
|
+
expect { main_form.text_field(:class => "non-existing-field").set "hello!" }.
|
20
21
|
to raise_exception(RAutomation::UnknownTextFieldException)
|
21
22
|
end
|
22
23
|
|
23
24
|
it "#clear" do
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
field.clear
|
29
|
-
field.value.should be_empty
|
25
|
+
text_field.set "hello!"
|
26
|
+
text_field.value.should == "hello!"
|
27
|
+
text_field.clear
|
28
|
+
text_field.value.should be_empty
|
30
29
|
|
31
30
|
RAutomation::Window.wait_timeout = 0.1
|
32
|
-
expect {
|
31
|
+
expect { main_form.text_field(:class => "non-existent-field").clear }.
|
33
32
|
to raise_exception(RAutomation::UnknownTextFieldException)
|
34
33
|
end
|
35
34
|
|
36
35
|
it "#value" do
|
37
|
-
|
38
|
-
|
39
|
-
field.set "hello!"
|
40
|
-
field.value.should == "hello!"
|
36
|
+
text_field.set "hello!"
|
37
|
+
text_field.value.should == "hello!"
|
41
38
|
|
42
39
|
RAutomation::Window.wait_timeout = 0.1
|
43
|
-
expect {
|
40
|
+
expect { main_form.text_field(:class => "non-existent-field").value }.
|
44
41
|
to raise_exception(RAutomation::UnknownTextFieldException)
|
45
42
|
end
|
46
43
|
|
47
44
|
it "#exists?" do
|
48
|
-
|
49
|
-
field = window.text_field(:class => /Edit/i, :index => 1)
|
45
|
+
field = main_form.text_field(:class => /Edit/i, :index => 1)
|
50
46
|
field.should exist
|
51
|
-
|
47
|
+
main_form.text_field(:class => "non-existent-field").should_not exist
|
52
48
|
end
|
53
49
|
|
54
50
|
|
55
51
|
it "#hwnd" do
|
56
|
-
|
57
|
-
field = window.text_field(:class => /Edit/i, :index => 1)
|
52
|
+
field = main_form.text_field(:class => /Edit/i, :index => 1)
|
58
53
|
field.hwnd.should be_a(Fixnum)
|
59
54
|
|
60
55
|
RAutomation::Window.wait_timeout = 0.1
|
61
|
-
expect {
|
56
|
+
expect { main_form.text_field(:class => "non-existing-window").hwnd }.
|
62
57
|
to raise_exception(RAutomation::UnknownTextFieldException)
|
63
58
|
end
|
64
59
|
end
|
data/spec/window_spec.rb
CHANGED
@@ -54,9 +54,7 @@ describe RAutomation::Window do
|
|
54
54
|
it "#class_names" do
|
55
55
|
window = RAutomation::Window.new(:title => SpecHelper::DATA[:window1_title])
|
56
56
|
|
57
|
-
fail "Expected class name not found." unless window.class_names.
|
58
|
-
window.class_names.include?("WindowsForms10.Window.8.app.0.2bf8098_r16_ad1") or
|
59
|
-
window.class_names.include?("WindowsForms10.Window.8.app.0.2bf8098_r11_ad1")
|
57
|
+
fail "Expected class name not found." unless window.class_names.any? {|clazz| clazz.match(/WindowsForms10\.Window\.8\.app\.0\.2bf8098_r\d{2}_ad1/)}
|
60
58
|
|
61
59
|
RAutomation::Window.wait_timeout = 0.1
|
62
60
|
expect {RAutomation::Window.new(:title => "non-existing-window").class_names}.
|
metadata
CHANGED
@@ -1,36 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rautomation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.9.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jarmo Pertman
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-04-22 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: ffi
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rspec
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,40 +41,40 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: yard
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
|
-
description:
|
79
|
-
automate windows and their controls
|
80
|
-
|
81
|
-
|
82
|
-
|
69
|
+
description: |-
|
70
|
+
RAutomation is a small and easy to use library for helping out to automate windows and their controls
|
71
|
+
for automated testing.
|
72
|
+
|
73
|
+
RAutomation provides:
|
74
|
+
* Easy to use and user-friendly API (inspired by Watir http://www.watir.com)
|
75
|
+
* Cross-platform compatibility
|
76
|
+
* Easy extensibility - with small scripting effort it's possible to add support for not yet
|
77
|
+
supported platforms or technologies
|
83
78
|
email: jarmo.p@gmail.com
|
84
79
|
executables: []
|
85
80
|
extensions: []
|
@@ -110,24 +105,34 @@ files:
|
|
110
105
|
- ext/IAccessibleDLL/IAccessibleDLL/stdafx.h
|
111
106
|
- ext/IAccessibleDLL/IAccessibleDLL/table_support.cpp
|
112
107
|
- ext/IAccessibleDLL/IAccessibleDLL/targetver.h
|
113
|
-
- ext/IAccessibleDLL/Release/IAccessibleDLL.dll
|
114
|
-
- ext/UiaDll/Release/UiaDll.dll
|
115
108
|
- ext/UiaDll/UiaDll.sln
|
116
109
|
- ext/UiaDll/UiaDll/AssemblyInfo.cpp
|
117
|
-
- ext/UiaDll/UiaDll/
|
118
|
-
- ext/UiaDll/UiaDll/
|
110
|
+
- ext/UiaDll/UiaDll/AutomatedSelectList.cpp
|
111
|
+
- ext/UiaDll/UiaDll/AutomatedSelectList.h
|
119
112
|
- ext/UiaDll/UiaDll/AutomatedTable.cpp
|
120
113
|
- ext/UiaDll/UiaDll/AutomatedTable.h
|
121
114
|
- ext/UiaDll/UiaDll/AutomationClicker.cpp
|
122
115
|
- ext/UiaDll/UiaDll/AutomationClicker.h
|
116
|
+
- ext/UiaDll/UiaDll/AutomationControl.cpp
|
117
|
+
- ext/UiaDll/UiaDll/AutomationControl.h
|
118
|
+
- ext/UiaDll/UiaDll/AutomationFinder.cpp
|
119
|
+
- ext/UiaDll/UiaDll/AutomationFinder.h
|
120
|
+
- ext/UiaDll/UiaDll/ControlMethods.cpp
|
123
121
|
- ext/UiaDll/UiaDll/ExpandCollapseHelper.cpp
|
124
122
|
- ext/UiaDll/UiaDll/ExpandCollapseHelper.h
|
125
123
|
- ext/UiaDll/UiaDll/MenuItemSelector.cpp
|
126
124
|
- ext/UiaDll/UiaDll/MenuItemSelector.h
|
125
|
+
- ext/UiaDll/UiaDll/MenuMethods.cpp
|
127
126
|
- ext/UiaDll/UiaDll/ReadMe.txt
|
127
|
+
- ext/UiaDll/UiaDll/SelectListMethods.cpp
|
128
|
+
- ext/UiaDll/UiaDll/SelectionItem.cpp
|
129
|
+
- ext/UiaDll/UiaDll/SelectionItem.h
|
128
130
|
- ext/UiaDll/UiaDll/StringHelper.cpp
|
129
131
|
- ext/UiaDll/UiaDll/StringHelper.h
|
130
|
-
- ext/UiaDll/UiaDll/
|
132
|
+
- ext/UiaDll/UiaDll/StringMethods.cpp
|
133
|
+
- ext/UiaDll/UiaDll/TableMethods.cpp
|
134
|
+
- ext/UiaDll/UiaDll/Toggle.cpp
|
135
|
+
- ext/UiaDll/UiaDll/Toggle.h
|
131
136
|
- ext/UiaDll/UiaDll/ToggleStateHelper.h
|
132
137
|
- ext/UiaDll/UiaDll/UiaDll.cpp
|
133
138
|
- ext/UiaDll/UiaDll/UiaDll.h
|
@@ -141,11 +146,12 @@ files:
|
|
141
146
|
- ext/UiaDll/UiaDll/stdafx.cpp
|
142
147
|
- ext/UiaDll/UiaDll/stdafx.h
|
143
148
|
- ext/UiaDll/UiaDll/targetver.h
|
144
|
-
- ext/WindowsForms/Release/WindowsForms.exe
|
145
149
|
- ext/WindowsForms/WindowsForms.sln
|
146
150
|
- ext/WindowsForms/WindowsForms/AboutBox.Designer.cs
|
147
151
|
- ext/WindowsForms/WindowsForms/AboutBox.cs
|
148
152
|
- ext/WindowsForms/WindowsForms/AboutBox.resx
|
153
|
+
- ext/WindowsForms/WindowsForms/AutomatableMonthCalendar.cs
|
154
|
+
- ext/WindowsForms/WindowsForms/AutomationHelpers/AutomationProvider.cs
|
149
155
|
- ext/WindowsForms/WindowsForms/DataEntryForm.Designer.cs
|
150
156
|
- ext/WindowsForms/WindowsForms/DataEntryForm.cs
|
151
157
|
- ext/WindowsForms/WindowsForms/DataEntryForm.resx
|
@@ -192,6 +198,7 @@ files:
|
|
192
198
|
- lib/rautomation/adapter/ms_uia/table.rb
|
193
199
|
- lib/rautomation/adapter/ms_uia/text_field.rb
|
194
200
|
- lib/rautomation/adapter/ms_uia/uia_dll.rb
|
201
|
+
- lib/rautomation/adapter/ms_uia/value_control.rb
|
195
202
|
- lib/rautomation/adapter/ms_uia/window.rb
|
196
203
|
- lib/rautomation/adapter/win_32.rb
|
197
204
|
- lib/rautomation/adapter/win_32/button.rb
|
@@ -231,6 +238,7 @@ files:
|
|
231
238
|
- spec/adapter/ms_uia/select_list_spec.rb
|
232
239
|
- spec/adapter/ms_uia/table_spec.rb
|
233
240
|
- spec/adapter/ms_uia/text_field_spec.rb
|
241
|
+
- spec/adapter/ms_uia/value_control_spec.rb
|
234
242
|
- spec/adapter/ms_uia/window_spec.rb
|
235
243
|
- spec/adapter/win_32/button_spec.rb
|
236
244
|
- spec/adapter/win_32/checkbox_spec.rb
|
@@ -249,29 +257,31 @@ files:
|
|
249
257
|
- spec/text_fields_spec.rb
|
250
258
|
- spec/window_spec.rb
|
251
259
|
- spec/windows_spec.rb
|
260
|
+
- ext/IAccessibleDLL/Release/IAccessibleDLL.dll
|
261
|
+
- ext/UiaDll/Release/UiaDll.dll
|
262
|
+
- ext/WindowsForms/Release/WindowsForms.exe
|
252
263
|
homepage: http://github.com/jarmo/RAutomation
|
253
264
|
licenses: []
|
265
|
+
metadata: {}
|
254
266
|
post_install_message:
|
255
267
|
rdoc_options: []
|
256
268
|
require_paths:
|
257
269
|
- lib
|
258
270
|
required_ruby_version: !ruby/object:Gem::Requirement
|
259
|
-
none: false
|
260
271
|
requirements:
|
261
|
-
- -
|
272
|
+
- - '>='
|
262
273
|
- !ruby/object:Gem::Version
|
263
274
|
version: '0'
|
264
275
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
265
|
-
none: false
|
266
276
|
requirements:
|
267
|
-
- -
|
277
|
+
- - '>='
|
268
278
|
- !ruby/object:Gem::Version
|
269
279
|
version: '0'
|
270
280
|
requirements: []
|
271
281
|
rubyforge_project:
|
272
|
-
rubygems_version:
|
282
|
+
rubygems_version: 2.0.3
|
273
283
|
signing_key:
|
274
|
-
specification_version:
|
284
|
+
specification_version: 4
|
275
285
|
summary: Automate windows and their controls through user-friendly API with Ruby
|
276
286
|
test_files:
|
277
287
|
- spec/adapter/autoit/mouse_spec.rb
|
@@ -288,6 +298,7 @@ test_files:
|
|
288
298
|
- spec/adapter/ms_uia/select_list_spec.rb
|
289
299
|
- spec/adapter/ms_uia/table_spec.rb
|
290
300
|
- spec/adapter/ms_uia/text_field_spec.rb
|
301
|
+
- spec/adapter/ms_uia/value_control_spec.rb
|
291
302
|
- spec/adapter/ms_uia/window_spec.rb
|
292
303
|
- spec/adapter/win_32/button_spec.rb
|
293
304
|
- spec/adapter/win_32/checkbox_spec.rb
|
@@ -1,33 +0,0 @@
|
|
1
|
-
#include "StdAfx.h"
|
2
|
-
#include "ToggleStateHelper.h"
|
3
|
-
|
4
|
-
|
5
|
-
ToggleStateHelper::ToggleStateHelper(void)
|
6
|
-
{
|
7
|
-
}
|
8
|
-
|
9
|
-
|
10
|
-
ToggleStateHelper::~ToggleStateHelper(void)
|
11
|
-
{
|
12
|
-
}
|
13
|
-
|
14
|
-
BOOL ToggleStateHelper::IsSet(IUIAutomationElement* automationElement)
|
15
|
-
{
|
16
|
-
IToggleProvider* togglePattern;
|
17
|
-
HRESULT hr = automationElement->GetCurrentPattern(UIA_TogglePatternId, (IUnknown**)&togglePattern);
|
18
|
-
|
19
|
-
if (FAILED(hr)) {
|
20
|
-
printf("RA_GetIsSet: getCurrentPattern failed 0x%x\r\n");
|
21
|
-
return FALSE;
|
22
|
-
}
|
23
|
-
|
24
|
-
ToggleState RetVal ;
|
25
|
-
hr = togglePattern->get_ToggleState(&RetVal) ;
|
26
|
-
togglePattern->Release();
|
27
|
-
if (FAILED(hr)) {
|
28
|
-
printf("RA_GetIsSet: get_ToggleState failed 0x%x\r\n", hr);
|
29
|
-
return FALSE;
|
30
|
-
} else {
|
31
|
-
return RetVal;
|
32
|
-
}
|
33
|
-
}
|