rautomation 2.0.1-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +7 -0
  2. data/.document +5 -0
  3. data/.gitignore +41 -0
  4. data/.rspec +2 -0
  5. data/.yardopts +8 -0
  6. data/CHANGES.md +276 -0
  7. data/Gemfile +3 -0
  8. data/LICENSE +20 -0
  9. data/README.md +142 -0
  10. data/Rakefile +73 -0
  11. data/ext/AutoItX/AutoItX.chm +0 -0
  12. data/ext/AutoItX/AutoItX3.dll +0 -0
  13. data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.cpp +30 -0
  14. data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.vcxproj +179 -0
  15. data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.vcxproj.filters +42 -0
  16. data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.vcxproj.user +3 -0
  17. data/ext/IAccessibleDLL/IAccessibleDLL/ReadMe.txt +48 -0
  18. data/ext/IAccessibleDLL/IAccessibleDLL/dllmain.cpp +19 -0
  19. data/ext/IAccessibleDLL/IAccessibleDLL/stdafx.cpp +8 -0
  20. data/ext/IAccessibleDLL/IAccessibleDLL/stdafx.h +22 -0
  21. data/ext/IAccessibleDLL/IAccessibleDLL/table_support.cpp +282 -0
  22. data/ext/IAccessibleDLL/IAccessibleDLL/targetver.h +8 -0
  23. data/ext/IAccessibleDLL/IAccessibleDLL.sln +31 -0
  24. data/ext/IAccessibleDLL/IAccessibleDLL.suo +0 -0
  25. data/ext/IAccessibleDLL/Release/IAccessibleDLL.dll +0 -0
  26. data/ext/UiaDll/RAutomation.UIA/Controls/Clicker.cs +63 -0
  27. data/ext/UiaDll/RAutomation.UIA/Controls/SelectList.cs +116 -0
  28. data/ext/UiaDll/RAutomation.UIA/Controls/Spinner.cs +46 -0
  29. data/ext/UiaDll/RAutomation.UIA/Controls/TabControl.cs +54 -0
  30. data/ext/UiaDll/RAutomation.UIA/Controls/TableControl.cs +132 -0
  31. data/ext/UiaDll/RAutomation.UIA/Controls/TextControl.cs +50 -0
  32. data/ext/UiaDll/RAutomation.UIA/Expander.cs +59 -0
  33. data/ext/UiaDll/RAutomation.UIA/Extensions/Element.cs +166 -0
  34. data/ext/UiaDll/RAutomation.UIA/Extensions/Enumerable.cs +76 -0
  35. data/ext/UiaDll/RAutomation.UIA/Extensions/Property.cs +27 -0
  36. data/ext/UiaDll/RAutomation.UIA/Properties/AssemblyInfo.cs +36 -0
  37. data/ext/UiaDll/RAutomation.UIA/Properties/AutomationProperties.cs +18 -0
  38. data/ext/UiaDll/RAutomation.UIA/RAutomation.UIA.csproj +77 -0
  39. data/ext/UiaDll/Release/RAutomation.UIA.dll +0 -0
  40. data/ext/UiaDll/Release/UiaDll.dll +0 -0
  41. data/ext/UiaDll/UiaDll/ArrayHelper.cpp +14 -0
  42. data/ext/UiaDll/UiaDll/ArrayHelper.h +7 -0
  43. data/ext/UiaDll/UiaDll/AssemblyInfo.cpp +40 -0
  44. data/ext/UiaDll/UiaDll/ControlMethods.cpp +16 -0
  45. data/ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp +24 -0
  46. data/ext/UiaDll/UiaDll/DynamicAssemblyResolver.h +16 -0
  47. data/ext/UiaDll/UiaDll/Locator.cpp +93 -0
  48. data/ext/UiaDll/UiaDll/Locator.h +55 -0
  49. data/ext/UiaDll/UiaDll/MenuItemSelector.cpp +75 -0
  50. data/ext/UiaDll/UiaDll/MenuItemSelector.h +24 -0
  51. data/ext/UiaDll/UiaDll/MenuMethods.cpp +62 -0
  52. data/ext/UiaDll/UiaDll/ReadMe.txt +38 -0
  53. data/ext/UiaDll/UiaDll/SelectListMethods.cpp +84 -0
  54. data/ext/UiaDll/UiaDll/SpinnerMethods.cpp +61 -0
  55. data/ext/UiaDll/UiaDll/StringHelper.cpp +57 -0
  56. data/ext/UiaDll/UiaDll/StringHelper.h +15 -0
  57. data/ext/UiaDll/UiaDll/StringMethods.cpp +8 -0
  58. data/ext/UiaDll/UiaDll/TabControlMethods.cpp +40 -0
  59. data/ext/UiaDll/UiaDll/TableMethods.cpp +108 -0
  60. data/ext/UiaDll/UiaDll/TextMethods.cpp +25 -0
  61. data/ext/UiaDll/UiaDll/ToggleStateHelper.h +10 -0
  62. data/ext/UiaDll/UiaDll/UiaDll.cpp +216 -0
  63. data/ext/UiaDll/UiaDll/UiaDll.h +13 -0
  64. data/ext/UiaDll/UiaDll/UiaDll.vcxproj +167 -0
  65. data/ext/UiaDll/UiaDll/UiaDll.vcxproj.filters +110 -0
  66. data/ext/UiaDll/UiaDll/app.ico +0 -0
  67. data/ext/UiaDll/UiaDll/app.rc +0 -0
  68. data/ext/UiaDll/UiaDll/dllmain.cpp +1 -0
  69. data/ext/UiaDll/UiaDll/resource.h +3 -0
  70. data/ext/UiaDll/UiaDll/stdafx.cpp +5 -0
  71. data/ext/UiaDll/UiaDll/stdafx.h +41 -0
  72. data/ext/UiaDll/UiaDll/targetver.h +8 -0
  73. data/ext/UiaDll/UiaDll.sln +57 -0
  74. data/ext/WindowsForms/.nuget/NuGet.Config +6 -0
  75. data/ext/WindowsForms/.nuget/NuGet.exe +0 -0
  76. data/ext/WindowsForms/.nuget/NuGet.targets +136 -0
  77. data/ext/WindowsForms/Release/FizzWare.NBuilder.dll +0 -0
  78. data/ext/WindowsForms/Release/UIA.Extensions.dll +0 -0
  79. data/ext/WindowsForms/Release/WindowsForms.exe +0 -0
  80. data/ext/WindowsForms/WindowsForms/AboutBox.Designer.cs +168 -0
  81. data/ext/WindowsForms/WindowsForms/AboutBox.cs +103 -0
  82. data/ext/WindowsForms/WindowsForms/AboutBox.resx +123 -0
  83. data/ext/WindowsForms/WindowsForms/DataEntryForm.Designer.cs +218 -0
  84. data/ext/WindowsForms/WindowsForms/DataEntryForm.cs +52 -0
  85. data/ext/WindowsForms/WindowsForms/DataEntryForm.resx +120 -0
  86. data/ext/WindowsForms/WindowsForms/DataGridView.Designer.cs +77 -0
  87. data/ext/WindowsForms/WindowsForms/DataGridView.cs +43 -0
  88. data/ext/WindowsForms/WindowsForms/DataGridView.resx +120 -0
  89. data/ext/WindowsForms/WindowsForms/FizzWare.NBuilder.dll +0 -0
  90. data/ext/WindowsForms/WindowsForms/MainFormWindow.Designer.cs +527 -0
  91. data/ext/WindowsForms/WindowsForms/MainFormWindow.cs +109 -0
  92. data/ext/WindowsForms/WindowsForms/MainFormWindow.resx +126 -0
  93. data/ext/WindowsForms/WindowsForms/PersonForm.Designer.cs +119 -0
  94. data/ext/WindowsForms/WindowsForms/PersonForm.cs +34 -0
  95. data/ext/WindowsForms/WindowsForms/PersonForm.resx +120 -0
  96. data/ext/WindowsForms/WindowsForms/Program.cs +21 -0
  97. data/ext/WindowsForms/WindowsForms/Properties/AssemblyInfo.cs +36 -0
  98. data/ext/WindowsForms/WindowsForms/Properties/Resources.Designer.cs +71 -0
  99. data/ext/WindowsForms/WindowsForms/Properties/Resources.resx +117 -0
  100. data/ext/WindowsForms/WindowsForms/Properties/Settings.Designer.cs +30 -0
  101. data/ext/WindowsForms/WindowsForms/Properties/Settings.settings +7 -0
  102. data/ext/WindowsForms/WindowsForms/SimpleElementsForm.Designer.cs +93 -0
  103. data/ext/WindowsForms/WindowsForms/SimpleElementsForm.cs +19 -0
  104. data/ext/WindowsForms/WindowsForms/SimpleElementsForm.resx +120 -0
  105. data/ext/WindowsForms/WindowsForms/UIA.Extensions.dll +0 -0
  106. data/ext/WindowsForms/WindowsForms/ValueMonthCalendar.cs +28 -0
  107. data/ext/WindowsForms/WindowsForms/WindowsForms.csproj +166 -0
  108. data/ext/WindowsForms/WindowsForms/packages.config +4 -0
  109. data/ext/WindowsForms/WindowsForms.sln +46 -0
  110. data/lib/rautomation/adapter/autoit/button.rb +59 -0
  111. data/lib/rautomation/adapter/autoit/locators.rb +22 -0
  112. data/lib/rautomation/adapter/autoit/mouse.rb +38 -0
  113. data/lib/rautomation/adapter/autoit/text_field.rb +70 -0
  114. data/lib/rautomation/adapter/autoit/window.rb +197 -0
  115. data/lib/rautomation/adapter/autoit.rb +8 -0
  116. data/lib/rautomation/adapter/helper.rb +64 -0
  117. data/lib/rautomation/adapter/ms_uia/button.rb +21 -0
  118. data/lib/rautomation/adapter/ms_uia/button_helper.rb +19 -0
  119. data/lib/rautomation/adapter/ms_uia/checkbox.rb +23 -0
  120. data/lib/rautomation/adapter/ms_uia/constants.rb +111 -0
  121. data/lib/rautomation/adapter/ms_uia/control.rb +134 -0
  122. data/lib/rautomation/adapter/ms_uia/functions.rb +279 -0
  123. data/lib/rautomation/adapter/ms_uia/keys.rb +121 -0
  124. data/lib/rautomation/adapter/ms_uia/keystroke_converter.rb +122 -0
  125. data/lib/rautomation/adapter/ms_uia/label.rb +18 -0
  126. data/lib/rautomation/adapter/ms_uia/list_box.rb +46 -0
  127. data/lib/rautomation/adapter/ms_uia/list_item.rb +22 -0
  128. data/lib/rautomation/adapter/ms_uia/locators.rb +23 -0
  129. data/lib/rautomation/adapter/ms_uia/menu.rb +36 -0
  130. data/lib/rautomation/adapter/ms_uia/radio.rb +23 -0
  131. data/lib/rautomation/adapter/ms_uia/select_list.rb +85 -0
  132. data/lib/rautomation/adapter/ms_uia/spinner.rb +31 -0
  133. data/lib/rautomation/adapter/ms_uia/tab_control.rb +46 -0
  134. data/lib/rautomation/adapter/ms_uia/table.rb +140 -0
  135. data/lib/rautomation/adapter/ms_uia/text_field.rb +39 -0
  136. data/lib/rautomation/adapter/ms_uia/uia_dll.rb +428 -0
  137. data/lib/rautomation/adapter/ms_uia/value_control.rb +21 -0
  138. data/lib/rautomation/adapter/ms_uia/window.rb +289 -0
  139. data/lib/rautomation/adapter/ms_uia.rb +27 -0
  140. data/lib/rautomation/adapter/win_32/button.rb +14 -0
  141. data/lib/rautomation/adapter/win_32/button_helper.rb +24 -0
  142. data/lib/rautomation/adapter/win_32/checkbox.rb +14 -0
  143. data/lib/rautomation/adapter/win_32/constants.rb +73 -0
  144. data/lib/rautomation/adapter/win_32/control.rb +86 -0
  145. data/lib/rautomation/adapter/win_32/functions.rb +336 -0
  146. data/lib/rautomation/adapter/win_32/keys.rb +146 -0
  147. data/lib/rautomation/adapter/win_32/label.rb +10 -0
  148. data/lib/rautomation/adapter/win_32/list_box.rb +40 -0
  149. data/lib/rautomation/adapter/win_32/locators.rb +22 -0
  150. data/lib/rautomation/adapter/win_32/mouse.rb +59 -0
  151. data/lib/rautomation/adapter/win_32/password_field.rb +15 -0
  152. data/lib/rautomation/adapter/win_32/radio.rb +11 -0
  153. data/lib/rautomation/adapter/win_32/select_list.rb +97 -0
  154. data/lib/rautomation/adapter/win_32/table.rb +25 -0
  155. data/lib/rautomation/adapter/win_32/text_field.rb +52 -0
  156. data/lib/rautomation/adapter/win_32/window.rb +277 -0
  157. data/lib/rautomation/adapter/win_32.rb +23 -0
  158. data/lib/rautomation/button.rb +55 -0
  159. data/lib/rautomation/element_collections.rb +55 -0
  160. data/lib/rautomation/platform.rb +15 -0
  161. data/lib/rautomation/text_field.rb +60 -0
  162. data/lib/rautomation/version.rb +3 -0
  163. data/lib/rautomation/wait_helper.rb +23 -0
  164. data/lib/rautomation/window.rb +248 -0
  165. data/lib/rautomation.rb +8 -0
  166. data/rautomation.gemspec +52 -0
  167. data/spec/adapter/autoit/mouse_spec.rb +53 -0
  168. data/spec/adapter/autoit/window_spec.rb +17 -0
  169. data/spec/adapter/ms_uia/button_spec.rb +39 -0
  170. data/spec/adapter/ms_uia/checkbox_spec.rb +55 -0
  171. data/spec/adapter/ms_uia/control_spec.rb +88 -0
  172. data/spec/adapter/ms_uia/functions_spec.rb +39 -0
  173. data/spec/adapter/ms_uia/keystroke_converter_spec.rb +48 -0
  174. data/spec/adapter/ms_uia/label_spec.rb +18 -0
  175. data/spec/adapter/ms_uia/list_item_spec.rb +14 -0
  176. data/spec/adapter/ms_uia/listbox_spec.rb +73 -0
  177. data/spec/adapter/ms_uia/radio_spec.rb +39 -0
  178. data/spec/adapter/ms_uia/select_list_spec.rb +118 -0
  179. data/spec/adapter/ms_uia/spinner_spec.rb +44 -0
  180. data/spec/adapter/ms_uia/tab_control_spec.rb +53 -0
  181. data/spec/adapter/ms_uia/table_spec.rb +197 -0
  182. data/spec/adapter/ms_uia/text_field_spec.rb +43 -0
  183. data/spec/adapter/ms_uia/value_control_spec.rb +11 -0
  184. data/spec/adapter/ms_uia/window_spec.rb +81 -0
  185. data/spec/adapter/win_32/button_spec.rb +31 -0
  186. data/spec/adapter/win_32/checkbox_spec.rb +46 -0
  187. data/spec/adapter/win_32/label_spec.rb +13 -0
  188. data/spec/adapter/win_32/listbox_spec.rb +41 -0
  189. data/spec/adapter/win_32/mouse_spec.rb +49 -0
  190. data/spec/adapter/win_32/radio_spec.rb +33 -0
  191. data/spec/adapter/win_32/select_list_spec.rb +65 -0
  192. data/spec/adapter/win_32/table_spec.rb +27 -0
  193. data/spec/adapter/win_32/text_field_spec.rb +24 -0
  194. data/spec/adapter/win_32/window_spec.rb +61 -0
  195. data/spec/button_spec.rb +67 -0
  196. data/spec/buttons_spec.rb +21 -0
  197. data/spec/spec_helper.rb +128 -0
  198. data/spec/text_field_spec.rb +64 -0
  199. data/spec/text_fields_spec.rb +22 -0
  200. data/spec/window_spec.rb +150 -0
  201. data/spec/windows_spec.rb +76 -0
  202. metadata +369 -0
@@ -0,0 +1,30 @@
1
+ //------------------------------------------------------------------------------
2
+ // <auto-generated>
3
+ // This code was generated by a tool.
4
+ // Runtime Version:4.0.30319.1
5
+ //
6
+ // Changes to this file may cause incorrect behavior and will be lost if
7
+ // the code is regenerated.
8
+ // </auto-generated>
9
+ //------------------------------------------------------------------------------
10
+
11
+ namespace WindowsForms.Properties
12
+ {
13
+
14
+
15
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
17
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18
+ {
19
+
20
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21
+
22
+ public static Settings Default
23
+ {
24
+ get
25
+ {
26
+ return defaultInstance;
27
+ }
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,7 @@
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
3
+ <Profiles>
4
+ <Profile Name="(Default)" />
5
+ </Profiles>
6
+ <Settings />
7
+ </SettingsFile>
@@ -0,0 +1,93 @@
1
+ namespace WindowsForms
2
+ {
3
+ partial class SimpleElementsForm
4
+ {
5
+ /// <summary>
6
+ /// Required designer variable.
7
+ /// </summary>
8
+ private System.ComponentModel.IContainer components = null;
9
+
10
+ /// <summary>
11
+ /// Clean up any resources being used.
12
+ /// </summary>
13
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
14
+ protected override void Dispose(bool disposing)
15
+ {
16
+ if (disposing && (components != null))
17
+ {
18
+ components.Dispose();
19
+ }
20
+ base.Dispose(disposing);
21
+ }
22
+
23
+ #region Windows Form Designer generated code
24
+
25
+ /// <summary>
26
+ /// Required method for Designer support - do not modify
27
+ /// the contents of this method with the code editor.
28
+ /// </summary>
29
+ private void InitializeComponent()
30
+ {
31
+ this.button1 = new System.Windows.Forms.Button();
32
+ this.button2 = new System.Windows.Forms.Button();
33
+ this.textBox1 = new System.Windows.Forms.TextBox();
34
+ this.textBox2 = new System.Windows.Forms.TextBox();
35
+ this.SuspendLayout();
36
+ //
37
+ // button1
38
+ //
39
+ this.button1.Location = new System.Drawing.Point(12, 12);
40
+ this.button1.Name = "button1";
41
+ this.button1.Size = new System.Drawing.Size(75, 23);
42
+ this.button1.TabIndex = 0;
43
+ this.button1.Text = "button1";
44
+ this.button1.UseVisualStyleBackColor = true;
45
+ //
46
+ // button2
47
+ //
48
+ this.button2.Location = new System.Drawing.Point(12, 41);
49
+ this.button2.Name = "button2";
50
+ this.button2.Size = new System.Drawing.Size(75, 23);
51
+ this.button2.TabIndex = 1;
52
+ this.button2.Text = "button2";
53
+ this.button2.UseVisualStyleBackColor = true;
54
+ //
55
+ // textBox1
56
+ //
57
+ this.textBox1.Location = new System.Drawing.Point(12, 96);
58
+ this.textBox1.Name = "textBox1";
59
+ this.textBox1.Size = new System.Drawing.Size(100, 20);
60
+ this.textBox1.TabIndex = 2;
61
+ //
62
+ // textBox2
63
+ //
64
+ this.textBox2.Location = new System.Drawing.Point(12, 70);
65
+ this.textBox2.Name = "textBox2";
66
+ this.textBox2.Size = new System.Drawing.Size(100, 20);
67
+ this.textBox2.TabIndex = 3;
68
+ this.textBox2.Text = "Enter some text";
69
+ //
70
+ // SimpleElementsForm
71
+ //
72
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
73
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
74
+ this.ClientSize = new System.Drawing.Size(184, 273);
75
+ this.Controls.Add(this.textBox2);
76
+ this.Controls.Add(this.textBox1);
77
+ this.Controls.Add(this.button2);
78
+ this.Controls.Add(this.button1);
79
+ this.Name = "SimpleElementsForm";
80
+ this.Text = "SimpleElementsForm";
81
+ this.ResumeLayout(false);
82
+ this.PerformLayout();
83
+
84
+ }
85
+
86
+ #endregion
87
+
88
+ private System.Windows.Forms.Button button1;
89
+ private System.Windows.Forms.Button button2;
90
+ private System.Windows.Forms.TextBox textBox1;
91
+ private System.Windows.Forms.TextBox textBox2;
92
+ }
93
+ }
@@ -0,0 +1,19 @@
1
+ using System;
2
+ using System.Collections.Generic;
3
+ using System.ComponentModel;
4
+ using System.Data;
5
+ using System.Drawing;
6
+ using System.Linq;
7
+ using System.Text;
8
+ using System.Windows.Forms;
9
+
10
+ namespace WindowsForms
11
+ {
12
+ public partial class SimpleElementsForm : Form
13
+ {
14
+ public SimpleElementsForm()
15
+ {
16
+ InitializeComponent();
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,120 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <root>
3
+ <!--
4
+ Microsoft ResX Schema
5
+
6
+ Version 2.0
7
+
8
+ The primary goals of this format is to allow a simple XML format
9
+ that is mostly human readable. The generation and parsing of the
10
+ various data types are done through the TypeConverter classes
11
+ associated with the data types.
12
+
13
+ Example:
14
+
15
+ ... ado.net/XML headers & schema ...
16
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
17
+ <resheader name="version">2.0</resheader>
18
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
24
+ </data>
25
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
+ <comment>This is a comment</comment>
28
+ </data>
29
+
30
+ There are any number of "resheader" rows that contain simple
31
+ name/value pairs.
32
+
33
+ Each data row contains a name, and value. The row also contains a
34
+ type or mimetype. Type corresponds to a .NET class that support
35
+ text/value conversion through the TypeConverter architecture.
36
+ Classes that don't support this are serialized and stored with the
37
+ mimetype set.
38
+
39
+ The mimetype is used for serialized objects, and tells the
40
+ ResXResourceReader how to depersist the object. This is currently not
41
+ extensible. For a given mimetype the value must be set accordingly:
42
+
43
+ Note - application/x-microsoft.net.object.binary.base64 is the format
44
+ that the ResXResourceWriter will generate, however the reader can
45
+ read any of the formats listed below.
46
+
47
+ mimetype: application/x-microsoft.net.object.binary.base64
48
+ value : The object must be serialized with
49
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
+ : and then encoded with base64 encoding.
51
+
52
+ mimetype: application/x-microsoft.net.object.soap.base64
53
+ value : The object must be serialized with
54
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
+ : and then encoded with base64 encoding.
56
+
57
+ mimetype: application/x-microsoft.net.object.bytearray.base64
58
+ value : The object must be serialized into a byte array
59
+ : using a System.ComponentModel.TypeConverter
60
+ : and then encoded with base64 encoding.
61
+ -->
62
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
+ <xsd:element name="root" msdata:IsDataSet="true">
65
+ <xsd:complexType>
66
+ <xsd:choice maxOccurs="unbounded">
67
+ <xsd:element name="metadata">
68
+ <xsd:complexType>
69
+ <xsd:sequence>
70
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
+ </xsd:sequence>
72
+ <xsd:attribute name="name" use="required" type="xsd:string" />
73
+ <xsd:attribute name="type" type="xsd:string" />
74
+ <xsd:attribute name="mimetype" type="xsd:string" />
75
+ <xsd:attribute ref="xml:space" />
76
+ </xsd:complexType>
77
+ </xsd:element>
78
+ <xsd:element name="assembly">
79
+ <xsd:complexType>
80
+ <xsd:attribute name="alias" type="xsd:string" />
81
+ <xsd:attribute name="name" type="xsd:string" />
82
+ </xsd:complexType>
83
+ </xsd:element>
84
+ <xsd:element name="data">
85
+ <xsd:complexType>
86
+ <xsd:sequence>
87
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
+ </xsd:sequence>
90
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
+ <xsd:attribute ref="xml:space" />
94
+ </xsd:complexType>
95
+ </xsd:element>
96
+ <xsd:element name="resheader">
97
+ <xsd:complexType>
98
+ <xsd:sequence>
99
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
+ </xsd:sequence>
101
+ <xsd:attribute name="name" type="xsd:string" use="required" />
102
+ </xsd:complexType>
103
+ </xsd:element>
104
+ </xsd:choice>
105
+ </xsd:complexType>
106
+ </xsd:element>
107
+ </xsd:schema>
108
+ <resheader name="resmimetype">
109
+ <value>text/microsoft-resx</value>
110
+ </resheader>
111
+ <resheader name="version">
112
+ <value>2.0</value>
113
+ </resheader>
114
+ <resheader name="reader">
115
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
+ </resheader>
117
+ <resheader name="writer">
118
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
+ </resheader>
120
+ </root>
@@ -0,0 +1,28 @@
1
+ using System;
2
+ using System.Globalization;
3
+ using System.Windows.Forms;
4
+ using UIA.Extensions.AutomationProviders.Interfaces;
5
+
6
+ namespace WindowsForms
7
+ {
8
+ public class ValueMonthCalendar : ValueControl
9
+ {
10
+ private readonly MonthCalendar _monthCalendar;
11
+
12
+ public ValueMonthCalendar(MonthCalendar monthCalendar) : base(monthCalendar)
13
+ {
14
+ _monthCalendar = monthCalendar;
15
+ }
16
+
17
+ public override string Value
18
+ {
19
+ get { return _monthCalendar.SelectionStart.ToString("d", EnglishCulture); }
20
+ set { _monthCalendar.SetDate(DateTime.Parse(value, EnglishCulture)); }
21
+ }
22
+
23
+ private static CultureInfo EnglishCulture
24
+ {
25
+ get { return new CultureInfo("en-US"); }
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,166 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <PropertyGroup>
4
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
6
+ <ProductVersion>8.0.30703</ProductVersion>
7
+ <SchemaVersion>2.0</SchemaVersion>
8
+ <ProjectGuid>{79C33EDA-58C4-41EF-93DC-BA679895BD43}</ProjectGuid>
9
+ <OutputType>WinExe</OutputType>
10
+ <AppDesignerFolder>Properties</AppDesignerFolder>
11
+ <RootNamespace>WindowsForms</RootNamespace>
12
+ <AssemblyName>WindowsForms</AssemblyName>
13
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
14
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile>
15
+ <FileAlignment>512</FileAlignment>
16
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
17
+ <RestorePackages>true</RestorePackages>
18
+ </PropertyGroup>
19
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
20
+ <PlatformTarget>x86</PlatformTarget>
21
+ <DebugSymbols>true</DebugSymbols>
22
+ <DebugType>full</DebugType>
23
+ <Optimize>false</Optimize>
24
+ <OutputPath>..\Debug\</OutputPath>
25
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
26
+ <ErrorReport>prompt</ErrorReport>
27
+ <WarningLevel>4</WarningLevel>
28
+ </PropertyGroup>
29
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
30
+ <PlatformTarget>x86</PlatformTarget>
31
+ <DebugType>pdbonly</DebugType>
32
+ <Optimize>true</Optimize>
33
+ <OutputPath>..\Release\</OutputPath>
34
+ <DefineConstants>TRACE</DefineConstants>
35
+ <ErrorReport>prompt</ErrorReport>
36
+ <WarningLevel>4</WarningLevel>
37
+ </PropertyGroup>
38
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
39
+ <DebugSymbols>true</DebugSymbols>
40
+ <OutputPath>bin\x64\Debug\</OutputPath>
41
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
42
+ <DebugType>full</DebugType>
43
+ <PlatformTarget>x64</PlatformTarget>
44
+ <ErrorReport>prompt</ErrorReport>
45
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
46
+ </PropertyGroup>
47
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
48
+ <OutputPath>bin\x64\Release\</OutputPath>
49
+ <DefineConstants>TRACE</DefineConstants>
50
+ <Optimize>true</Optimize>
51
+ <DebugType>pdbonly</DebugType>
52
+ <PlatformTarget>x64</PlatformTarget>
53
+ <ErrorReport>prompt</ErrorReport>
54
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
55
+ </PropertyGroup>
56
+ <ItemGroup>
57
+ <Reference Include="FizzWare.NBuilder">
58
+ <HintPath>.\FizzWare.NBuilder.dll</HintPath>
59
+ </Reference>
60
+ <Reference Include="System" />
61
+ <Reference Include="System.Core" />
62
+ <Reference Include="System.Xml.Linq" />
63
+ <Reference Include="System.Data.DataSetExtensions" />
64
+ <Reference Include="Microsoft.CSharp" />
65
+ <Reference Include="System.Data" />
66
+ <Reference Include="System.Deployment" />
67
+ <Reference Include="System.Drawing" />
68
+ <Reference Include="System.Windows.Forms" />
69
+ <Reference Include="System.Xml" />
70
+ <Reference Include="UIA.Extensions">
71
+ <HintPath>..\packages\UIA.Extensions.1.0.5.0\lib\net35\UIA.Extensions.dll</HintPath>
72
+ </Reference>
73
+ <Reference Include="UIAutomationClient" />
74
+ <Reference Include="UIAutomationProvider" />
75
+ <Reference Include="UIAutomationTypes" />
76
+ <Reference Include="WindowsBase" />
77
+ </ItemGroup>
78
+ <ItemGroup>
79
+ <Compile Include="AboutBox.cs">
80
+ <SubType>Form</SubType>
81
+ </Compile>
82
+ <Compile Include="AboutBox.Designer.cs">
83
+ <DependentUpon>AboutBox.cs</DependentUpon>
84
+ </Compile>
85
+ <Compile Include="DataEntryForm.cs">
86
+ <SubType>Form</SubType>
87
+ </Compile>
88
+ <Compile Include="DataEntryForm.Designer.cs">
89
+ <DependentUpon>DataEntryForm.cs</DependentUpon>
90
+ </Compile>
91
+ <Compile Include="DataGridView.cs">
92
+ <SubType>Form</SubType>
93
+ </Compile>
94
+ <Compile Include="DataGridView.Designer.cs">
95
+ <DependentUpon>DataGridView.cs</DependentUpon>
96
+ </Compile>
97
+ <Compile Include="SimpleElementsForm.cs">
98
+ <SubType>Form</SubType>
99
+ </Compile>
100
+ <Compile Include="SimpleElementsForm.Designer.cs">
101
+ <DependentUpon>SimpleElementsForm.cs</DependentUpon>
102
+ </Compile>
103
+ <Compile Include="PersonForm.cs">
104
+ <SubType>Form</SubType>
105
+ </Compile>
106
+ <Compile Include="PersonForm.Designer.cs">
107
+ <DependentUpon>PersonForm.cs</DependentUpon>
108
+ </Compile>
109
+ <Compile Include="MainFormWindow.cs">
110
+ <SubType>Form</SubType>
111
+ </Compile>
112
+ <Compile Include="MainFormWindow.Designer.cs">
113
+ <DependentUpon>MainFormWindow.cs</DependentUpon>
114
+ </Compile>
115
+ <Compile Include="Program.cs" />
116
+ <Compile Include="Properties\AssemblyInfo.cs" />
117
+ <Compile Include="ValueMonthCalendar.cs" />
118
+ <EmbeddedResource Include="AboutBox.resx">
119
+ <DependentUpon>AboutBox.cs</DependentUpon>
120
+ </EmbeddedResource>
121
+ <EmbeddedResource Include="DataEntryForm.resx">
122
+ <DependentUpon>DataEntryForm.cs</DependentUpon>
123
+ </EmbeddedResource>
124
+ <EmbeddedResource Include="DataGridView.resx">
125
+ <DependentUpon>DataGridView.cs</DependentUpon>
126
+ </EmbeddedResource>
127
+ <EmbeddedResource Include="SimpleElementsForm.resx">
128
+ <DependentUpon>SimpleElementsForm.cs</DependentUpon>
129
+ </EmbeddedResource>
130
+ <EmbeddedResource Include="PersonForm.resx">
131
+ <DependentUpon>PersonForm.cs</DependentUpon>
132
+ </EmbeddedResource>
133
+ <EmbeddedResource Include="MainFormWindow.resx">
134
+ <DependentUpon>MainFormWindow.cs</DependentUpon>
135
+ </EmbeddedResource>
136
+ <EmbeddedResource Include="Properties\Resources.resx">
137
+ <Generator>ResXFileCodeGenerator</Generator>
138
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
139
+ <SubType>Designer</SubType>
140
+ </EmbeddedResource>
141
+ <Compile Include="Properties\Resources.Designer.cs">
142
+ <AutoGen>True</AutoGen>
143
+ <DependentUpon>Resources.resx</DependentUpon>
144
+ </Compile>
145
+ <None Include="packages.config" />
146
+ <None Include="Properties\Settings.settings">
147
+ <Generator>SettingsSingleFileGenerator</Generator>
148
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
149
+ </None>
150
+ <Compile Include="Properties\Settings.Designer.cs">
151
+ <AutoGen>True</AutoGen>
152
+ <DependentUpon>Settings.settings</DependentUpon>
153
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
154
+ </Compile>
155
+ </ItemGroup>
156
+ <ItemGroup />
157
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
158
+ <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
159
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
160
+ Other similar extension points exist, see Microsoft.Common.targets.
161
+ <Target Name="BeforeBuild">
162
+ </Target>
163
+ <Target Name="AfterBuild">
164
+ </Target>
165
+ -->
166
+ </Project>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <packages>
3
+ <package id="UIA.Extensions" version="1.0.5.0" targetFramework="net40-Client" />
4
+ </packages>
@@ -0,0 +1,46 @@
1
+ 
2
+ Microsoft Visual Studio Solution File, Format Version 12.00
3
+ # Visual Studio 15
4
+ VisualStudioVersion = 15.0.28307.1433
5
+ MinimumVisualStudioVersion = 10.0.40219.1
6
+ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsForms", "WindowsForms\WindowsForms.csproj", "{79C33EDA-58C4-41EF-93DC-BA679895BD43}"
7
+ EndProject
8
+ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{C2B59FF1-0EE8-457F-A808-3B558459DA57}"
9
+ ProjectSection(SolutionItems) = preProject
10
+ .nuget\NuGet.Config = .nuget\NuGet.Config
11
+ .nuget\NuGet.exe = .nuget\NuGet.exe
12
+ .nuget\NuGet.targets = .nuget\NuGet.targets
13
+ EndProjectSection
14
+ EndProject
15
+ Global
16
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
17
+ Debug|Any CPU = Debug|Any CPU
18
+ Debug|Mixed Platforms = Debug|Mixed Platforms
19
+ Debug|x64 = Debug|x64
20
+ Debug|x86 = Debug|x86
21
+ Release|Any CPU = Release|Any CPU
22
+ Release|Mixed Platforms = Release|Mixed Platforms
23
+ Release|x64 = Release|x64
24
+ Release|x86 = Release|x86
25
+ EndGlobalSection
26
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
27
+ {79C33EDA-58C4-41EF-93DC-BA679895BD43}.Debug|Any CPU.ActiveCfg = Debug|x86
28
+ {79C33EDA-58C4-41EF-93DC-BA679895BD43}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
29
+ {79C33EDA-58C4-41EF-93DC-BA679895BD43}.Debug|Mixed Platforms.Build.0 = Debug|x86
30
+ {79C33EDA-58C4-41EF-93DC-BA679895BD43}.Debug|x64.ActiveCfg = Debug|x64
31
+ {79C33EDA-58C4-41EF-93DC-BA679895BD43}.Debug|x86.ActiveCfg = Debug|x86
32
+ {79C33EDA-58C4-41EF-93DC-BA679895BD43}.Debug|x86.Build.0 = Debug|x86
33
+ {79C33EDA-58C4-41EF-93DC-BA679895BD43}.Release|Any CPU.ActiveCfg = Release|x86
34
+ {79C33EDA-58C4-41EF-93DC-BA679895BD43}.Release|Mixed Platforms.ActiveCfg = Release|x86
35
+ {79C33EDA-58C4-41EF-93DC-BA679895BD43}.Release|Mixed Platforms.Build.0 = Release|x86
36
+ {79C33EDA-58C4-41EF-93DC-BA679895BD43}.Release|x64.ActiveCfg = Release|x64
37
+ {79C33EDA-58C4-41EF-93DC-BA679895BD43}.Release|x86.ActiveCfg = Release|x86
38
+ {79C33EDA-58C4-41EF-93DC-BA679895BD43}.Release|x86.Build.0 = Release|x86
39
+ EndGlobalSection
40
+ GlobalSection(SolutionProperties) = preSolution
41
+ HideSolutionNode = FALSE
42
+ EndGlobalSection
43
+ GlobalSection(ExtensibilityGlobals) = postSolution
44
+ SolutionGuid = {C6C32AFC-114D-4592-BF17-6CF8A9840DF2}
45
+ EndGlobalSection
46
+ EndGlobal
@@ -0,0 +1,59 @@
1
+ module RAutomation
2
+ module Adapter
3
+ module Autoit
4
+ class Button
5
+ include WaitHelper
6
+ include Locators
7
+
8
+ # Default locators used for searching buttons.
9
+ DEFAULT_LOCATORS = {:class => /button/i}
10
+
11
+ # @private
12
+ # Special-cased locators
13
+ LOCATORS = {
14
+ [:class, Regexp] => :regexpclass,
15
+ :index => :instance,
16
+ :value => :text
17
+ }
18
+
19
+ # Creates the button object.
20
+ # @note this method is not meant to be accessed directly, but only through {RAutomation::Window#button}!
21
+ # @param [RAutomation::Window] window this button belongs to.
22
+ # @param [Hash] locators for searching the button.
23
+ # @option locators [String, Regexp] :value Value (text) of the button
24
+ # @option locators [String, Regexp] :class Internal class name of the button
25
+ # @option locators [String, Integer] :id Internal ID of the button
26
+ # @option locators [String, Integer] :index 0-based index to specify n-th button if all other criteria match
27
+ # @see RAutomation::Window#button
28
+ def initialize(window, locators)
29
+ @window = window
30
+ extract(locators)
31
+ end
32
+
33
+ # @see RAutomation::Button#click
34
+ def click
35
+ clicked = false
36
+ wait_until do
37
+ @window.activate
38
+ @window.active? &&
39
+ Window.autoit.ControlFocus(@window.locator_hwnd, "", @autoit_locators) == 1 &&
40
+ Window.autoit.ControlClick(@window.locator_hwnd, "", @autoit_locators) == 1 &&
41
+ clicked = true # is clicked at least once
42
+
43
+ block_given? ? yield : clicked && !exists?
44
+ end
45
+ end
46
+
47
+ # @see RAutomation::Button#value
48
+ def value
49
+ Window.autoit.ControlGetText(@window.locator_hwnd, "", @autoit_locators)
50
+ end
51
+
52
+ # @see RAutomation::Button#exists?
53
+ def exists?
54
+ not Window.autoit.ControlGetHandle(@window.locator_hwnd, "", @autoit_locators).empty?
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,22 @@
1
+ module RAutomation
2
+ module Adapter
3
+ module Autoit
4
+ # @private
5
+ module Locators
6
+
7
+ private
8
+
9
+ def extract(locators)
10
+ locators = self.class::DEFAULT_LOCATORS.merge(locators) if self.class.const_defined?(:DEFAULT_LOCATORS)
11
+ @locators = {:index => 0}.merge(locators)
12
+ @autoit_locators = "[#{@locators.map do |locator, value|
13
+ locator_key = self.class::LOCATORS[locator] || self.class::LOCATORS[[locator, value.class]]
14
+ value = value.to_i + 1 if locator == :index # use 0-based indexing
15
+ value = value.to_s(16) if locator == :hwnd
16
+ "#{(locator_key || locator)}:#{value}"
17
+ end.join(";")}]"
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,38 @@
1
+ module RAutomation
2
+ module Adapter
3
+ module Autoit
4
+ class Mouse
5
+ def initialize(window)
6
+ @window = window
7
+ @autoit = window.class.autoit
8
+ end
9
+
10
+ def move(coords={})
11
+ @last_position = coords = (@last_position || position).merge(coords)
12
+
13
+ until position[:x] == coords[:x] && position[:y] == coords[:y]
14
+ @window.activate
15
+ @autoit.MouseMove(coords[:x], coords[:y])
16
+ end
17
+ end
18
+
19
+ def position
20
+ {:x => @autoit.MouseGetPosX, :y => @autoit.MouseGetPosY}
21
+ end
22
+
23
+ def click(button = "left")
24
+ @autoit.MouseClick(button)
25
+ end
26
+
27
+ def press(button = "left")
28
+ @autoit.MouseDown(button)
29
+ end
30
+
31
+ def release(button = "left")
32
+ @autoit.MouseUp(button)
33
+ end
34
+
35
+ end
36
+ end
37
+ end
38
+ end