rdp-rautomation 0.6.3.1
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/.document +5 -0
- data/.rspec +2 -0
- data/.yardopts +6 -0
- data/History.rdoc +103 -0
- data/LICENSE +20 -0
- data/README.rdoc +114 -0
- data/Rakefile +43 -0
- data/VERSION +1 -0
- data/ext/AutoItX/AutoItX.chm +0 -0
- data/ext/AutoItX/AutoItX3.dll +0 -0
- data/ext/IAccessibleDLL/IAccessibleDLL.sln +20 -0
- data/ext/IAccessibleDLL/IAccessibleDLL.suo +0 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.cpp +30 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.vcxproj +102 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.vcxproj.filters +42 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.vcxproj.user +3 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/ReadMe.txt +48 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/dllmain.cpp +19 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/stdafx.cpp +8 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/stdafx.h +22 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/table_support.cpp +282 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/targetver.h +8 -0
- data/ext/IAccessibleDLL/Release/IAccessibleDLL.dll +0 -0
- data/ext/ListViewExplorer/ListViewExplorer.sln +20 -0
- data/ext/ListViewExplorer/ListViewExplorer.suo +0 -0
- data/ext/ListViewExplorer/ListViewExplorer/ListViewExplorer.cpp +174 -0
- data/ext/ListViewExplorer/ListViewExplorer/ListViewExplorer.vcxproj +95 -0
- data/ext/ListViewExplorer/ListViewExplorer/ListViewExplorer.vcxproj.filters +42 -0
- data/ext/ListViewExplorer/ListViewExplorer/ListViewExplorer.vcxproj.user +3 -0
- data/ext/ListViewExplorer/ListViewExplorer/ReadMe.txt +40 -0
- data/ext/ListViewExplorer/ListViewExplorer/stdafx.cpp +8 -0
- data/ext/ListViewExplorer/ListViewExplorer/stdafx.h +17 -0
- data/ext/ListViewExplorer/ListViewExplorer/table_support.cpp +250 -0
- data/ext/ListViewExplorer/ListViewExplorer/table_support.h +2 -0
- data/ext/ListViewExplorer/ListViewExplorer/targetver.h +8 -0
- data/ext/UiaDll/Release/UiaDll.dll +0 -0
- data/ext/UiaDll/UiaDll.sln +20 -0
- data/ext/UiaDll/UiaDll.suo +0 -0
- data/ext/UiaDll/UiaDll/ReadMe.txt +48 -0
- data/ext/UiaDll/UiaDll/UiaDll.cpp +205 -0
- data/ext/UiaDll/UiaDll/UiaDll.vcxproj +104 -0
- data/ext/UiaDll/UiaDll/UiaDll.vcxproj.filters +42 -0
- data/ext/UiaDll/UiaDll/dllmain.cpp +39 -0
- data/ext/UiaDll/UiaDll/globals.h +3 -0
- data/ext/UiaDll/UiaDll/stdafx.cpp +8 -0
- data/ext/UiaDll/UiaDll/stdafx.h +19 -0
- data/ext/UiaDll/UiaDll/targetver.h +8 -0
- data/ext/WindowsForms/bin/WindowsForms.exe +0 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms.sln +20 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms.suo +0 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/AboutBox.Designer.cs +80 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/AboutBox.cs +103 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/AboutBox.resx +120 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/DataEntryForm.Designer.cs +187 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/DataEntryForm.cs +46 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/DataEntryForm.resx +120 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/MainFormWindow.Designer.cs +377 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/MainFormWindow.cs +78 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/MainFormWindow.resx +120 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/PersonForm.Designer.cs +119 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/PersonForm.cs +34 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/PersonForm.resx +120 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/Program.cs +21 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/Properties/AssemblyInfo.cs +36 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/Properties/Resources.Designer.cs +71 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/Properties/Resources.resx +117 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/Properties/Settings.Designer.cs +30 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/Properties/Settings.settings +7 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/SimpleElementsForm.Designer.cs +93 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/SimpleElementsForm.cs +19 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/SimpleElementsForm.resx +120 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/WindowsForms.csproj +123 -0
- data/ext/WindowsForms/src/WindowsForms/WindowsForms/bin/Release/WindowsForms.exe +0 -0
- data/lib/rautomation.rb +6 -0
- data/lib/rautomation/adapter/autoit.rb +5 -0
- data/lib/rautomation/adapter/autoit/button.rb +59 -0
- data/lib/rautomation/adapter/autoit/locators.rb +22 -0
- data/lib/rautomation/adapter/autoit/text_field.rb +61 -0
- data/lib/rautomation/adapter/autoit/window.rb +184 -0
- data/lib/rautomation/adapter/helper.rb +20 -0
- data/lib/rautomation/adapter/win_ffi.rb +21 -0
- data/lib/rautomation/adapter/win_ffi/button.rb +25 -0
- data/lib/rautomation/adapter/win_ffi/button_helper.rb +24 -0
- data/lib/rautomation/adapter/win_ffi/checkbox.rb +19 -0
- data/lib/rautomation/adapter/win_ffi/constants.rb +94 -0
- data/lib/rautomation/adapter/win_ffi/control.rb +79 -0
- data/lib/rautomation/adapter/win_ffi/functions.rb +333 -0
- data/lib/rautomation/adapter/win_ffi/keystroke_converter.rb +67 -0
- data/lib/rautomation/adapter/win_ffi/label.rb +21 -0
- data/lib/rautomation/adapter/win_ffi/list_box.rb +60 -0
- data/lib/rautomation/adapter/win_ffi/locators.rb +22 -0
- data/lib/rautomation/adapter/win_ffi/ms_uia/uia_dll.rb +36 -0
- data/lib/rautomation/adapter/win_ffi/radio.rb +19 -0
- data/lib/rautomation/adapter/win_ffi/select_list.rb +87 -0
- data/lib/rautomation/adapter/win_ffi/table.rb +57 -0
- data/lib/rautomation/adapter/win_ffi/text_field.rb +52 -0
- data/lib/rautomation/adapter/win_ffi/window.rb +226 -0
- data/lib/rautomation/button.rb +55 -0
- data/lib/rautomation/element_collections.rb +47 -0
- data/lib/rautomation/text_field.rb +60 -0
- data/lib/rautomation/wait_helper.rb +23 -0
- data/lib/rautomation/window.rb +234 -0
- data/spec/adapter/win_ffi/button_spec.rb +41 -0
- data/spec/adapter/win_ffi/checkbox_spec.rb +48 -0
- data/spec/adapter/win_ffi/keystroke_converter_spec.rb +47 -0
- data/spec/adapter/win_ffi/label_spec.rb +21 -0
- data/spec/adapter/win_ffi/listbox_spec.rb +52 -0
- data/spec/adapter/win_ffi/radio_spec.rb +37 -0
- data/spec/adapter/win_ffi/select_list_spec.rb +66 -0
- data/spec/adapter/win_ffi/table_spec.rb +39 -0
- data/spec/adapter/win_ffi/text_field_spec.rb +23 -0
- data/spec/adapter/win_ffi/window_spec.rb +43 -0
- data/spec/button_spec.rb +68 -0
- data/spec/buttons_spec.rb +21 -0
- data/spec/spec_helper.rb +96 -0
- data/spec/text_field_spec.rb +65 -0
- data/spec/text_fields_spec.rb +22 -0
- data/spec/window_spec.rb +122 -0
- data/spec/windows_spec.rb +55 -0
- metadata +207 -0
data/.document
ADDED
data/.rspec
ADDED
data/.yardopts
ADDED
data/History.rdoc
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
== Version 0.6.3 / 2011-07-16
|
|
2
|
+
|
|
3
|
+
* use current window's handle (hwnd) in WinFfi::Window#child method
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
== Version 0.6.2 / 2011-07-07
|
|
7
|
+
|
|
8
|
+
=== WinFFI adapter
|
|
9
|
+
|
|
10
|
+
* loading lazily oleacc.dll
|
|
11
|
+
* loading lazily uia_dll.rb due to problems on certain Windows XP machines
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
== Version 0.6.1 / 2011-07-05
|
|
15
|
+
|
|
16
|
+
=== WinFFI adapter
|
|
17
|
+
|
|
18
|
+
* Fixed it for Ruby 1.9.2.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
== Version 0.6.0 / 2011-07-03
|
|
22
|
+
|
|
23
|
+
=== WinFFI adapter
|
|
24
|
+
|
|
25
|
+
* Window#send_keys now accepts only String argument similar to AutoIt's Send function.
|
|
26
|
+
* added Table#strings, #select, #selected? methods.
|
|
27
|
+
* added Label element support with #value method.
|
|
28
|
+
* added #has_focus? and #set_focus methods to controls.
|
|
29
|
+
* added possibility to search controls by automation id as :id.
|
|
30
|
+
* added #enabled? and #disabled? methods for controls.
|
|
31
|
+
* added Window#control and #controls methods for accessing controls generally.
|
|
32
|
+
* added SelectList#option method.
|
|
33
|
+
* added ListBox element support with #count, #items, #exist?, #selected? and #select methods.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
== Version 0.5.1 / 2011-01-30
|
|
37
|
+
|
|
38
|
+
=== All adapters
|
|
39
|
+
|
|
40
|
+
* added Window.windows, #windows, #buttons and #text_fields methods to retrieve collection of elements and use them with Enumerable/Array methods.
|
|
41
|
+
|
|
42
|
+
=== WinFFI adapter
|
|
43
|
+
|
|
44
|
+
* added Window#child method for searching child windows and popups
|
|
45
|
+
* added initial support for Radio, Checkbox, SelectList and Table
|
|
46
|
+
|
|
47
|
+
=== AutoIt adapter
|
|
48
|
+
|
|
49
|
+
* allow to search windows by PID
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
== Version 0.4.0 / 2010-12-23
|
|
53
|
+
|
|
54
|
+
* allow to search windows without text (like empty Notepad window for example).
|
|
55
|
+
* added possibility to use block for #click to specify successful clicking condition.
|
|
56
|
+
* renamed :ffi adapter to :win_ffi because FFI may be used on other platforms too.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
== Version 0.3.0 / 2010-12-18
|
|
60
|
+
|
|
61
|
+
* added Ffi adapter specific method Window#child which searches for child windows and popups
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
== Version 0.2.1 / 2010-12-17
|
|
65
|
+
|
|
66
|
+
* added yard options for documentation
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
== Version 0.2.0 / 2010-12-17
|
|
70
|
+
|
|
71
|
+
* added Window#pid method
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
== Version 0.1.0 / 2010-12-14
|
|
75
|
+
|
|
76
|
+
* added new default adapter for Windows: FFI
|
|
77
|
+
* changes for AutoIt adapter:
|
|
78
|
+
- added 0-based :index locator for window locators to search for windows with the same criteria.
|
|
79
|
+
- renamed text_field and button locator :instance to :index instead.
|
|
80
|
+
- :class_name locator is not allowed anymore. Use :class and :index together instead.
|
|
81
|
+
- use :value for button locator instead of :text
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
== Version 0.0.4 / 2010-10-27
|
|
85
|
+
|
|
86
|
+
* most Window, Button and TextField methods wait until the object exists.
|
|
87
|
+
Use RAutomation::Window.wait_timeout= to set timeout before failing. Default is 60 seconds.
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
== Version 0.0.3 / 2010-10-15
|
|
91
|
+
|
|
92
|
+
* RAutomation didn't load AutoIt correctly if it wasn't installed before
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
== Version 0.0.2 / 2010-10-14
|
|
96
|
+
|
|
97
|
+
* using :value locator for buttons instead of :text
|
|
98
|
+
* searching only visible windows with some text on them
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
== Version 0.0.1 / 2010-10-13
|
|
102
|
+
|
|
103
|
+
* Initial release
|
data/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright (c) 2010-2011 Jarmo Pertman
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
= RAutomation
|
|
2
|
+
|
|
3
|
+
* Web: http://www.github.com/jarmo/RAutomation
|
|
4
|
+
* Author: Jarmo Pertman (mailto:jarmo.p[at]gmail.com)
|
|
5
|
+
|
|
6
|
+
== DESCRIPTION
|
|
7
|
+
|
|
8
|
+
RAutomation is a small and easy to use library for helping out to automate windows and their controls
|
|
9
|
+
for automated testing.
|
|
10
|
+
|
|
11
|
+
RAutomation provides:
|
|
12
|
+
* Easy to use and user-friendly API (inspired by Watir http://www.watir.com)
|
|
13
|
+
* Cross-platform compatibility
|
|
14
|
+
* Easy extensibility - with small scripting effort it's possible to add support for not yet
|
|
15
|
+
supported platforms or technologies
|
|
16
|
+
|
|
17
|
+
== USAGE
|
|
18
|
+
|
|
19
|
+
require "rautomation"
|
|
20
|
+
|
|
21
|
+
window = RAutomation::Window.new(:title => /part of the title/i)
|
|
22
|
+
window.exists? # => true
|
|
23
|
+
|
|
24
|
+
window.title # => "blah blah part Of the title blah"
|
|
25
|
+
window.text # => "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ultricies..."
|
|
26
|
+
|
|
27
|
+
window.text_field(:class => "Edit", :index => 0).set "hello, world!"
|
|
28
|
+
button = window.button(:value => "&Save")
|
|
29
|
+
button.exists? # => true
|
|
30
|
+
button.click
|
|
31
|
+
|
|
32
|
+
all_windows = RAutomation::Window.windows
|
|
33
|
+
all_windows.each {|window| puts window.hwnd}
|
|
34
|
+
|
|
35
|
+
window = RAutomation::Window.new(:title => /part of the title/i)
|
|
36
|
+
windows = window.windows
|
|
37
|
+
puts windows.size # => 2
|
|
38
|
+
windows.map {|window| window.title } # => ["part of the title 1", "part of the title 2"]
|
|
39
|
+
|
|
40
|
+
window.windows(:title => /part of other title/i) # => all windows with matching specified title
|
|
41
|
+
|
|
42
|
+
window.buttons.each {|button| puts button.value}
|
|
43
|
+
window.buttons(:value => /some value/i).each {|button| puts button.value}
|
|
44
|
+
|
|
45
|
+
window2 = RAutomation::Window.new(:title => "Other Title", :adapter => :autoit) # use AutoIt adapter
|
|
46
|
+
# use adapter's (in this case AutoIt's) internal methods not part of the public API directly
|
|
47
|
+
window2.WinClose("[TITLE:Other Title]")
|
|
48
|
+
|
|
49
|
+
Check out the documentation for other possible usages!
|
|
50
|
+
|
|
51
|
+
== INSTALL
|
|
52
|
+
|
|
53
|
+
=== Windows
|
|
54
|
+
|
|
55
|
+
1. gem install rautomation
|
|
56
|
+
2. create script and run it
|
|
57
|
+
|
|
58
|
+
Available adapters:
|
|
59
|
+
* :ffi - uses Windows API directly with FFI (default)
|
|
60
|
+
* :autoit - uses AutoIt for automation
|
|
61
|
+
|
|
62
|
+
When using AutoIt adapter:
|
|
63
|
+
You might need administrative privileges if running for the first time and you haven't installed AutoIt before!
|
|
64
|
+
|
|
65
|
+
=== Linux
|
|
66
|
+
|
|
67
|
+
Feel yourself at home on Linux and know how to automate windows and their controls? I would be happy if you'd contact me
|
|
68
|
+
about that matter - or even better, follow the instructions at "How to create a new adapter?"
|
|
69
|
+
|
|
70
|
+
=== OS X
|
|
71
|
+
|
|
72
|
+
Feel yourself at home on OS X and know how to automate windows and their controls? I would be happy if you'd contact me
|
|
73
|
+
about that matter - or even better, follow the instructions at "How to create a new adapter?"
|
|
74
|
+
|
|
75
|
+
=== Others
|
|
76
|
+
|
|
77
|
+
Feel yourself at home on some operating system not listed in here and know how to automate windows and their controls?
|
|
78
|
+
Does Ruby also work on that operating system? I would be happy if you'd contact me
|
|
79
|
+
about that matter - or even better, follow the instructions at "How to create a new adapter?"
|
|
80
|
+
|
|
81
|
+
== How to create a new adapter?
|
|
82
|
+
|
|
83
|
+
1. Fork the project.
|
|
84
|
+
2. Create entry point file to lib/rautomation/adapter which should load all adapter specific files.
|
|
85
|
+
3. Add `autoload` statement into lib/rautomation/adapter/helper.rb for that file.
|
|
86
|
+
4. Create a directory for your adapter's specific code into lib/rautomation/adapter
|
|
87
|
+
5. Copy button.rb, text_field.rb and window.rb from some of the existing adapter's directory.
|
|
88
|
+
6. Add spec data for your adapter into spec/spec_helper DATA constant.
|
|
89
|
+
7. Use environment variable __RAUTOMATION_ADAPTER__ to point to that adapter.
|
|
90
|
+
8. Start coding and spec-ing until as much of possible of the public API is satisfied.
|
|
91
|
+
9. Make me a pull request.
|
|
92
|
+
|
|
93
|
+
Don't forget to fix the documentation for that adapter also!
|
|
94
|
+
|
|
95
|
+
In case of any problems, feel free to contact me.
|
|
96
|
+
|
|
97
|
+
== Contributors
|
|
98
|
+
|
|
99
|
+
* Stephan Schwab to WinFfi adapter - http://github.com/snscaimito
|
|
100
|
+
|
|
101
|
+
== Note on Patches/Pull Requests
|
|
102
|
+
|
|
103
|
+
* Fork the project.
|
|
104
|
+
* Make your feature addition or bug fix.
|
|
105
|
+
* Add tests for it. This is important so I don't break it in a
|
|
106
|
+
future version unintentionally.
|
|
107
|
+
* Commit, do not mess with rakefile, version, or history.
|
|
108
|
+
|
|
109
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
|
110
|
+
* Send me a pull request. Bonus points for topic branches.
|
|
111
|
+
|
|
112
|
+
== Copyright
|
|
113
|
+
|
|
114
|
+
Copyright (c) 2010-2011 Jarmo Pertman. See LICENSE for details.
|
data/Rakefile
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
require 'rubygems'
|
|
2
|
+
require 'rake'
|
|
3
|
+
|
|
4
|
+
begin
|
|
5
|
+
require 'jeweler'
|
|
6
|
+
Jeweler::Tasks.new do |gem|
|
|
7
|
+
gem.name = "rdp-rautomation"
|
|
8
|
+
gem.summary = %Q{Automate windows and their controls through user-friendly API with Ruby}
|
|
9
|
+
gem.description = %Q{RAutomation is a small and easy to use library for helping out to automate windows and their controls
|
|
10
|
+
for automated testing.
|
|
11
|
+
|
|
12
|
+
RAutomation provides:
|
|
13
|
+
* Easy to use and user-friendly API (inspired by Watir http://www.watir.com)
|
|
14
|
+
* Cross-platform compatibility
|
|
15
|
+
* Easy extensibility - with small scripting effort it's possible to add support for not yet
|
|
16
|
+
supported platforms or technologies}
|
|
17
|
+
gem.email = "jarmo.p@gmail.com"
|
|
18
|
+
gem.homepage = "http://github.com/jarmo/RAutomation"
|
|
19
|
+
gem.authors = ["Jarmo Pertman"]
|
|
20
|
+
gem.add_development_dependency "rspec", "~>2.3"
|
|
21
|
+
|
|
22
|
+
ignored_files = []
|
|
23
|
+
ignored_files << ".gitignore" << ".gemspec" << "features" << "IAccessibleDLL.sdf"
|
|
24
|
+
gem.files = `git ls-files`.strip.split($/).delete_if {|f| f =~ Regexp.union(*ignored_files)}
|
|
25
|
+
end
|
|
26
|
+
Jeweler::GemcutterTasks.new
|
|
27
|
+
rescue LoadError
|
|
28
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
require 'rspec/core/rake_task'
|
|
32
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
33
|
+
|
|
34
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
|
35
|
+
spec.rcov = true
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
task :spec => :check_dependencies
|
|
39
|
+
|
|
40
|
+
task :default => :spec
|
|
41
|
+
|
|
42
|
+
require 'yard'
|
|
43
|
+
YARD::Rake::YardocTask.new
|
data/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.6.3.1
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
Microsoft Visual Studio Solution File, Format Version 11.00
|
|
3
|
+
# Visual Studio 2010
|
|
4
|
+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IAccessibleDLL", "IAccessibleDLL\IAccessibleDLL.vcxproj", "{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}"
|
|
5
|
+
EndProject
|
|
6
|
+
Global
|
|
7
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
8
|
+
Debug|Win32 = Debug|Win32
|
|
9
|
+
Release|Win32 = Release|Win32
|
|
10
|
+
EndGlobalSection
|
|
11
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
12
|
+
{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}.Debug|Win32.ActiveCfg = Debug|Win32
|
|
13
|
+
{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}.Debug|Win32.Build.0 = Debug|Win32
|
|
14
|
+
{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}.Release|Win32.ActiveCfg = Release|Win32
|
|
15
|
+
{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}.Release|Win32.Build.0 = Release|Win32
|
|
16
|
+
EndGlobalSection
|
|
17
|
+
GlobalSection(SolutionProperties) = preSolution
|
|
18
|
+
HideSolutionNode = FALSE
|
|
19
|
+
EndGlobalSection
|
|
20
|
+
EndGlobal
|
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// IAccessibleDLL.cpp : Defines the exported functions for the DLL application.
|
|
2
|
+
//
|
|
3
|
+
|
|
4
|
+
#include "stdafx.h"
|
|
5
|
+
|
|
6
|
+
extern "C"
|
|
7
|
+
__declspec( dllexport ) long get_button_state(HWND buttonHwnd) {
|
|
8
|
+
IAccessible *pIAccessible ;
|
|
9
|
+
VARIANT varState;
|
|
10
|
+
VARIANT varChildId;
|
|
11
|
+
BOOL checked = FALSE ;
|
|
12
|
+
HRESULT hr ;
|
|
13
|
+
HMODULE hModule ;
|
|
14
|
+
LPFNACCESSIBLEOBJECTFROMWINDOW lpfnAccessibleObjectFromWindow ;
|
|
15
|
+
|
|
16
|
+
hModule = LoadLibraryA("oleacc.dll");
|
|
17
|
+
lpfnAccessibleObjectFromWindow = (LPFNACCESSIBLEOBJECTFROMWINDOW)GetProcAddress(hModule, "AccessibleObjectFromWindow");
|
|
18
|
+
|
|
19
|
+
hr = lpfnAccessibleObjectFromWindow(buttonHwnd, OBJID_CLIENT, IID_IAccessible, (void**)&pIAccessible) ;
|
|
20
|
+
|
|
21
|
+
VariantInit(&varChildId);
|
|
22
|
+
varChildId.vt = VT_I4;
|
|
23
|
+
varChildId.lVal = CHILDID_SELF ;
|
|
24
|
+
|
|
25
|
+
pIAccessible->get_accState(varChildId, &varState);
|
|
26
|
+
|
|
27
|
+
return varState.lVal ;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
+
<ItemGroup Label="ProjectConfigurations">
|
|
4
|
+
<ProjectConfiguration Include="Debug|Win32">
|
|
5
|
+
<Configuration>Debug</Configuration>
|
|
6
|
+
<Platform>Win32</Platform>
|
|
7
|
+
</ProjectConfiguration>
|
|
8
|
+
<ProjectConfiguration Include="Release|Win32">
|
|
9
|
+
<Configuration>Release</Configuration>
|
|
10
|
+
<Platform>Win32</Platform>
|
|
11
|
+
</ProjectConfiguration>
|
|
12
|
+
</ItemGroup>
|
|
13
|
+
<PropertyGroup Label="Globals">
|
|
14
|
+
<ProjectGuid>{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}</ProjectGuid>
|
|
15
|
+
<Keyword>Win32Proj</Keyword>
|
|
16
|
+
<RootNamespace>IAccessibleDLL</RootNamespace>
|
|
17
|
+
</PropertyGroup>
|
|
18
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
19
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
20
|
+
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
21
|
+
<UseDebugLibraries>true</UseDebugLibraries>
|
|
22
|
+
<CharacterSet>Unicode</CharacterSet>
|
|
23
|
+
</PropertyGroup>
|
|
24
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
25
|
+
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
26
|
+
<UseDebugLibraries>false</UseDebugLibraries>
|
|
27
|
+
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
28
|
+
<CharacterSet>Unicode</CharacterSet>
|
|
29
|
+
</PropertyGroup>
|
|
30
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
31
|
+
<ImportGroup Label="ExtensionSettings">
|
|
32
|
+
</ImportGroup>
|
|
33
|
+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
34
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
35
|
+
</ImportGroup>
|
|
36
|
+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
37
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
38
|
+
</ImportGroup>
|
|
39
|
+
<PropertyGroup Label="UserMacros" />
|
|
40
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
41
|
+
<LinkIncremental>true</LinkIncremental>
|
|
42
|
+
</PropertyGroup>
|
|
43
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
44
|
+
<LinkIncremental>false</LinkIncremental>
|
|
45
|
+
</PropertyGroup>
|
|
46
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
47
|
+
<ClCompile>
|
|
48
|
+
<PrecompiledHeader>Use</PrecompiledHeader>
|
|
49
|
+
<WarningLevel>Level3</WarningLevel>
|
|
50
|
+
<Optimization>Disabled</Optimization>
|
|
51
|
+
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IACCESSIBLEDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
52
|
+
</ClCompile>
|
|
53
|
+
<Link>
|
|
54
|
+
<SubSystem>Windows</SubSystem>
|
|
55
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
56
|
+
</Link>
|
|
57
|
+
</ItemDefinitionGroup>
|
|
58
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
59
|
+
<ClCompile>
|
|
60
|
+
<WarningLevel>Level3</WarningLevel>
|
|
61
|
+
<PrecompiledHeader>Use</PrecompiledHeader>
|
|
62
|
+
<Optimization>MaxSpeed</Optimization>
|
|
63
|
+
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
64
|
+
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
65
|
+
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IACCESSIBLEDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
66
|
+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
|
67
|
+
</ClCompile>
|
|
68
|
+
<Link>
|
|
69
|
+
<SubSystem>Windows</SubSystem>
|
|
70
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
71
|
+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
72
|
+
<OptimizeReferences>true</OptimizeReferences>
|
|
73
|
+
<AdditionalDependencies>oleacc.lib;comsuppw.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
74
|
+
</Link>
|
|
75
|
+
</ItemDefinitionGroup>
|
|
76
|
+
<ItemGroup>
|
|
77
|
+
<None Include="ReadMe.txt" />
|
|
78
|
+
</ItemGroup>
|
|
79
|
+
<ItemGroup>
|
|
80
|
+
<ClInclude Include="stdafx.h" />
|
|
81
|
+
<ClInclude Include="targetver.h" />
|
|
82
|
+
</ItemGroup>
|
|
83
|
+
<ItemGroup>
|
|
84
|
+
<ClCompile Include="dllmain.cpp">
|
|
85
|
+
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
|
86
|
+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
87
|
+
</PrecompiledHeader>
|
|
88
|
+
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
|
|
89
|
+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
90
|
+
</PrecompiledHeader>
|
|
91
|
+
</ClCompile>
|
|
92
|
+
<ClCompile Include="IAccessibleDLL.cpp" />
|
|
93
|
+
<ClCompile Include="stdafx.cpp">
|
|
94
|
+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
|
95
|
+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
|
96
|
+
</ClCompile>
|
|
97
|
+
<ClCompile Include="table_support.cpp" />
|
|
98
|
+
</ItemGroup>
|
|
99
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
100
|
+
<ImportGroup Label="ExtensionTargets">
|
|
101
|
+
</ImportGroup>
|
|
102
|
+
</Project>
|