uia 0.7.alpha.1 → 0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/ChangeLog +5 -1
- data/README.md +7 -0
- data/Rakefile +1 -9
- data/ext/UiaDll/UIA.Helper/Mouse.cs +10 -8
- data/ext/UiaDll/UIA.Helper/UIA.Helper.csproj +0 -9
- data/ext/UiaDll/UiaDll.Test/UiaDll.Test.vcxproj +0 -143
- data/ext/UiaDll/UiaDll.sln +0 -17
- data/ext/UiaDll/UiaDll/ConditionHelper.h +0 -2
- data/ext/UiaDll/UiaDll/SearchCondition.h +1 -2
- data/ext/UiaDll/UiaDll/UiaDll.vcxproj +0 -121
- data/lib/uia/library.rb +2 -3
- data/lib/uia/version.rb +1 -1
- data/spec/uia/element_spec.rb +6 -6
- data/spec/uia/keys_spec.rb +1 -1
- data/spec/uia_spec.rb +3 -3
- data/uia.gemspec +9 -11
- metadata +29 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c966c5e58a5c2b30fad2f966be8e24a881d4f309
|
4
|
+
data.tar.gz: 324ddfa069b36dd359f9f794cd639f8aab3dfef0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eae7ba71eea61ab05e842e03c61537d6893d94052fa0e514987e51b977159535cfb3ea7096c3778163e4370317f4f1ea145b4f61c14d7dd254559c354b48a8d
|
7
|
+
data.tar.gz: ab750c1795c1e1bf7c43444526f1d6198b703396e0563224ffddf2e4f95e5c75a135813a2dba1e1b4bdacf29f17c8a57dfbf03c94aeb5a062102be61d48e4b5c
|
data/.gitignore
CHANGED
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -116,6 +116,13 @@ Decorates your `Element` with the following methods:
|
|
116
116
|
* `selected?` - whether or not it is selected
|
117
117
|
* `container` - the `Selection` container
|
118
118
|
|
119
|
+
## Known bug
|
120
|
+
|
121
|
+
Crash with `[BUG] Segmentation fault`. Cause of this is ffi gem bug. Periodically the ffi team releases bad gem
|
122
|
+
[ffi/ffi#649](https://github.com/ffi/ffi/issues/649)
|
123
|
+
[ffi/ffi#302](https://github.com/ffi/ffi/issues/302).
|
124
|
+
The conditional solution is described [here](https://github.com/northwoodspd/uia/issues/14#issuecomment-411734522)
|
125
|
+
|
119
126
|
## Contributing
|
120
127
|
|
121
128
|
1. Fork it
|
data/Rakefile
CHANGED
@@ -9,19 +9,11 @@ RSpec::Core::RakeTask.new(:spec)
|
|
9
9
|
|
10
10
|
task :default => :spec
|
11
11
|
|
12
|
-
task :spec =>
|
12
|
+
task :spec => :build_release
|
13
13
|
task :build => :spec
|
14
14
|
|
15
15
|
desc 'Build the release version of UiaDll'
|
16
16
|
build :build_release do |b|
|
17
17
|
b.sln = 'ext/UiaDll/UiaDll.sln'
|
18
|
-
b.prop :Platform, 'Mixed Platforms'
|
19
18
|
b.prop :Configuration, :Release
|
20
19
|
end
|
21
|
-
|
22
|
-
desc 'Build the release x64 version of UiaDll'
|
23
|
-
build :build_release_x64 do |b|
|
24
|
-
b.sln = 'ext/UiaDll/UiaDll.sln'
|
25
|
-
b.prop :Platform, 'Mixed Platforms'
|
26
|
-
b.prop :Configuration, 'Release x64'
|
27
|
-
end
|
@@ -11,13 +11,7 @@ namespace UIA.Helper
|
|
11
11
|
[DllImport("user32.dll")]
|
12
12
|
static extern void mouse_event(uint flags, uint x, uint y, uint data, int extraInfo);
|
13
13
|
|
14
|
-
|
15
|
-
public enum MouseEvent
|
16
|
-
{
|
17
|
-
Leftdown = 0x00000002,
|
18
|
-
Leftup = 0x00000004,
|
19
|
-
}
|
20
|
-
|
14
|
+
private const uint MOUSEEVENTLF_MOVE = 0x1;
|
21
15
|
private const uint MOUSEEVENTLF_LEFTDOWN = 0x2;
|
22
16
|
private const uint MOUSEEVENTLF_LEFTUP = 0x4;
|
23
17
|
|
@@ -25,6 +19,9 @@ namespace UIA.Helper
|
|
25
19
|
{
|
26
20
|
Cursor.Position = new System.Drawing.Point(startX, startY);
|
27
21
|
Down();
|
22
|
+
|
23
|
+
Move((uint)((startX + endX) / 2), (uint)((startY + endY) / 2));
|
24
|
+
|
28
25
|
Cursor.Position = new System.Drawing.Point(endX, endY);
|
29
26
|
Up();
|
30
27
|
}
|
@@ -46,7 +43,7 @@ namespace UIA.Helper
|
|
46
43
|
|
47
44
|
var point = GetPoint();
|
48
45
|
|
49
|
-
Cursor.Position = new System.Drawing.Point((int)
|
46
|
+
Cursor.Position = new System.Drawing.Point((int)point.X, (int)point.Y);
|
50
47
|
Down();
|
51
48
|
Up();
|
52
49
|
}
|
@@ -61,6 +58,11 @@ namespace UIA.Helper
|
|
61
58
|
mouse_event(MOUSEEVENTLF_LEFTDOWN, 0, 0, 0, 0);
|
62
59
|
}
|
63
60
|
|
61
|
+
private static void Move(uint x, uint y)
|
62
|
+
{
|
63
|
+
mouse_event(MOUSEEVENTLF_MOVE, x, y, 0, 0);
|
64
|
+
}
|
65
|
+
|
64
66
|
private static Point Center(AutomationElement element)
|
65
67
|
{
|
66
68
|
try
|
@@ -30,15 +30,6 @@
|
|
30
30
|
<ErrorReport>prompt</ErrorReport>
|
31
31
|
<WarningLevel>4</WarningLevel>
|
32
32
|
</PropertyGroup>
|
33
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release x64|AnyCPU'">
|
34
|
-
<OutputPath>bin\Release x64\</OutputPath>
|
35
|
-
<DefineConstants>TRACE</DefineConstants>
|
36
|
-
<Optimize>true</Optimize>
|
37
|
-
<DebugType>pdbonly</DebugType>
|
38
|
-
<PlatformTarget>AnyCPU</PlatformTarget>
|
39
|
-
<ErrorReport>prompt</ErrorReport>
|
40
|
-
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
41
|
-
</PropertyGroup>
|
42
33
|
<ItemGroup>
|
43
34
|
<Reference Include="System" />
|
44
35
|
<Reference Include="System.Core" />
|
@@ -5,26 +5,10 @@
|
|
5
5
|
<Configuration>Debug</Configuration>
|
6
6
|
<Platform>Win32</Platform>
|
7
7
|
</ProjectConfiguration>
|
8
|
-
<ProjectConfiguration Include="Debug|x64">
|
9
|
-
<Configuration>Debug</Configuration>
|
10
|
-
<Platform>x64</Platform>
|
11
|
-
</ProjectConfiguration>
|
12
|
-
<ProjectConfiguration Include="Release x64|Win32">
|
13
|
-
<Configuration>Release x64</Configuration>
|
14
|
-
<Platform>Win32</Platform>
|
15
|
-
</ProjectConfiguration>
|
16
|
-
<ProjectConfiguration Include="Release x64|x64">
|
17
|
-
<Configuration>Release x64</Configuration>
|
18
|
-
<Platform>x64</Platform>
|
19
|
-
</ProjectConfiguration>
|
20
8
|
<ProjectConfiguration Include="Release|Win32">
|
21
9
|
<Configuration>Release</Configuration>
|
22
10
|
<Platform>Win32</Platform>
|
23
11
|
</ProjectConfiguration>
|
24
|
-
<ProjectConfiguration Include="Release|x64">
|
25
|
-
<Configuration>Release</Configuration>
|
26
|
-
<Platform>x64</Platform>
|
27
|
-
</ProjectConfiguration>
|
28
12
|
</ItemGroup>
|
29
13
|
<PropertyGroup Label="Globals">
|
30
14
|
<ProjectGuid>{E83CF3F7-74C6-4333-89E3-36C6297F0A06}</ProjectGuid>
|
@@ -40,27 +24,6 @@
|
|
40
24
|
<CLRSupport>true</CLRSupport>
|
41
25
|
<CharacterSet>Unicode</CharacterSet>
|
42
26
|
</PropertyGroup>
|
43
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
44
|
-
<ConfigurationType>Application</ConfigurationType>
|
45
|
-
<UseDebugLibraries>true</UseDebugLibraries>
|
46
|
-
<PlatformToolset>v110</PlatformToolset>
|
47
|
-
<CLRSupport>true</CLRSupport>
|
48
|
-
<CharacterSet>Unicode</CharacterSet>
|
49
|
-
</PropertyGroup>
|
50
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'" Label="Configuration">
|
51
|
-
<ConfigurationType>Application</ConfigurationType>
|
52
|
-
<UseDebugLibraries>true</UseDebugLibraries>
|
53
|
-
<PlatformToolset>v110</PlatformToolset>
|
54
|
-
<CLRSupport>true</CLRSupport>
|
55
|
-
<CharacterSet>Unicode</CharacterSet>
|
56
|
-
</PropertyGroup>
|
57
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'" Label="Configuration">
|
58
|
-
<ConfigurationType>Application</ConfigurationType>
|
59
|
-
<UseDebugLibraries>true</UseDebugLibraries>
|
60
|
-
<PlatformToolset>v110</PlatformToolset>
|
61
|
-
<CLRSupport>true</CLRSupport>
|
62
|
-
<CharacterSet>Unicode</CharacterSet>
|
63
|
-
</PropertyGroup>
|
64
27
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
65
28
|
<ConfigurationType>Application</ConfigurationType>
|
66
29
|
<UseDebugLibraries>false</UseDebugLibraries>
|
@@ -68,53 +31,22 @@
|
|
68
31
|
<CLRSupport>true</CLRSupport>
|
69
32
|
<CharacterSet>Unicode</CharacterSet>
|
70
33
|
</PropertyGroup>
|
71
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
72
|
-
<ConfigurationType>Application</ConfigurationType>
|
73
|
-
<UseDebugLibraries>false</UseDebugLibraries>
|
74
|
-
<PlatformToolset>v110</PlatformToolset>
|
75
|
-
<CLRSupport>true</CLRSupport>
|
76
|
-
<CharacterSet>Unicode</CharacterSet>
|
77
|
-
</PropertyGroup>
|
78
34
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
79
35
|
<ImportGroup Label="ExtensionSettings">
|
80
36
|
</ImportGroup>
|
81
37
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
82
38
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
83
39
|
</ImportGroup>
|
84
|
-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
85
|
-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
86
|
-
</ImportGroup>
|
87
|
-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'" Label="PropertySheets">
|
88
|
-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
89
|
-
</ImportGroup>
|
90
|
-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'" Label="PropertySheets">
|
91
|
-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
92
|
-
</ImportGroup>
|
93
40
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
94
41
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
95
42
|
</ImportGroup>
|
96
|
-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
97
|
-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
98
|
-
</ImportGroup>
|
99
43
|
<PropertyGroup Label="UserMacros" />
|
100
44
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
101
45
|
<LinkIncremental>true</LinkIncremental>
|
102
46
|
</PropertyGroup>
|
103
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
104
|
-
<LinkIncremental>true</LinkIncremental>
|
105
|
-
</PropertyGroup>
|
106
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">
|
107
|
-
<LinkIncremental>true</LinkIncremental>
|
108
|
-
</PropertyGroup>
|
109
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">
|
110
|
-
<LinkIncremental>true</LinkIncremental>
|
111
|
-
</PropertyGroup>
|
112
47
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
113
48
|
<LinkIncremental>false</LinkIncremental>
|
114
49
|
</PropertyGroup>
|
115
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
116
|
-
<LinkIncremental>false</LinkIncremental>
|
117
|
-
</PropertyGroup>
|
118
50
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
119
51
|
<ClCompile>
|
120
52
|
<WarningLevel>Level3</WarningLevel>
|
@@ -133,60 +65,6 @@
|
|
133
65
|
<Command>$(TargetPath)</Command>
|
134
66
|
</PostBuildEvent>
|
135
67
|
</ItemDefinitionGroup>
|
136
|
-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
137
|
-
<ClCompile>
|
138
|
-
<WarningLevel>Level3</WarningLevel>
|
139
|
-
<Optimization>Disabled</Optimization>
|
140
|
-
<PreprocessorDefinitions>WIN32;_VARIADIC_MAX=10;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
141
|
-
<PrecompiledHeader>Use</PrecompiledHeader>
|
142
|
-
<AdditionalIncludeDirectories>$(SolutionDir)UiaDll.Test\vendor\gmock\include;$(SolutionDir)UiaDll;$(SolutionDir)UiaDll.Test\vendor\gtest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
143
|
-
</ClCompile>
|
144
|
-
<Link>
|
145
|
-
<GenerateDebugInformation>true</GenerateDebugInformation>
|
146
|
-
<AdditionalDependencies>gtestd.lib;gmockd.lib</AdditionalDependencies>
|
147
|
-
<SubSystem>Console</SubSystem>
|
148
|
-
<AdditionalLibraryDirectories>$(SolutionDir)UiaDll.Test\vendor\gmock\lib;$(SolutionDir)UiaDll.Test\vendor\gtest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
149
|
-
</Link>
|
150
|
-
<PostBuildEvent>
|
151
|
-
<Command>$(TargetPath)</Command>
|
152
|
-
</PostBuildEvent>
|
153
|
-
</ItemDefinitionGroup>
|
154
|
-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">
|
155
|
-
<ClCompile>
|
156
|
-
<WarningLevel>Level3</WarningLevel>
|
157
|
-
<Optimization>Disabled</Optimization>
|
158
|
-
<PreprocessorDefinitions>WIN32;_VARIADIC_MAX=10;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
159
|
-
<PrecompiledHeader>Use</PrecompiledHeader>
|
160
|
-
<AdditionalIncludeDirectories>$(SolutionDir)UiaDll.Test\vendor\gmock\include;$(SolutionDir)UiaDll;$(SolutionDir)UiaDll.Test\vendor\gtest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
161
|
-
</ClCompile>
|
162
|
-
<Link>
|
163
|
-
<GenerateDebugInformation>true</GenerateDebugInformation>
|
164
|
-
<AdditionalDependencies>gtestd.lib;gmockd.lib</AdditionalDependencies>
|
165
|
-
<SubSystem>Console</SubSystem>
|
166
|
-
<AdditionalLibraryDirectories>$(SolutionDir)UiaDll.Test\vendor\gmock\lib;$(SolutionDir)UiaDll.Test\vendor\gtest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
167
|
-
</Link>
|
168
|
-
<PostBuildEvent>
|
169
|
-
<Command>$(TargetPath)</Command>
|
170
|
-
</PostBuildEvent>
|
171
|
-
</ItemDefinitionGroup>
|
172
|
-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">
|
173
|
-
<ClCompile>
|
174
|
-
<WarningLevel>Level3</WarningLevel>
|
175
|
-
<Optimization>Disabled</Optimization>
|
176
|
-
<PreprocessorDefinitions>WIN32;_VARIADIC_MAX=10;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
177
|
-
<PrecompiledHeader>Use</PrecompiledHeader>
|
178
|
-
<AdditionalIncludeDirectories>$(SolutionDir)UiaDll.Test\vendor\gmock\include;$(SolutionDir)UiaDll;$(SolutionDir)UiaDll.Test\vendor\gtest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
179
|
-
</ClCompile>
|
180
|
-
<Link>
|
181
|
-
<GenerateDebugInformation>true</GenerateDebugInformation>
|
182
|
-
<AdditionalDependencies>gtestd.lib;gmockd.lib</AdditionalDependencies>
|
183
|
-
<SubSystem>Console</SubSystem>
|
184
|
-
<AdditionalLibraryDirectories>$(SolutionDir)UiaDll.Test\vendor\gmock\lib;$(SolutionDir)UiaDll.Test\vendor\gtest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
185
|
-
</Link>
|
186
|
-
<PostBuildEvent>
|
187
|
-
<Command>$(TargetPath)</Command>
|
188
|
-
</PostBuildEvent>
|
189
|
-
</ItemDefinitionGroup>
|
190
68
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
191
69
|
<ClCompile>
|
192
70
|
<WarningLevel>Level3</WarningLevel>
|
@@ -204,23 +82,6 @@
|
|
204
82
|
<Command>$(TargetPath)</Command>
|
205
83
|
</PostBuildEvent>
|
206
84
|
</ItemDefinitionGroup>
|
207
|
-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
208
|
-
<ClCompile>
|
209
|
-
<WarningLevel>Level3</WarningLevel>
|
210
|
-
<PreprocessorDefinitions>WIN32;_VARIADIC_MAX=10;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
211
|
-
<PrecompiledHeader>Use</PrecompiledHeader>
|
212
|
-
<AdditionalIncludeDirectories>$(SolutionDir)UiaDll.Test\vendor\gmock\include;$(SolutionDir)UiaDll;$(SolutionDir)UiaDll.Test\vendor\gtest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
213
|
-
</ClCompile>
|
214
|
-
<Link>
|
215
|
-
<GenerateDebugInformation>true</GenerateDebugInformation>
|
216
|
-
<AdditionalDependencies>gtest.lib;gmock.lib</AdditionalDependencies>
|
217
|
-
<SubSystem>Console</SubSystem>
|
218
|
-
<AdditionalLibraryDirectories>$(SolutionDir)UiaDll.Test\vendor\gmock\lib;$(SolutionDir)UiaDll.Test\vendor\gtest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
219
|
-
</Link>
|
220
|
-
<PostBuildEvent>
|
221
|
-
<Command>$(TargetPath)</Command>
|
222
|
-
</PostBuildEvent>
|
223
|
-
</ItemDefinitionGroup>
|
224
85
|
<ItemGroup>
|
225
86
|
<Reference Include="System" />
|
226
87
|
<Reference Include="System.Core" />
|
@@ -248,11 +109,7 @@
|
|
248
109
|
<ClCompile Include="SearchConditionTest.cpp" />
|
249
110
|
<ClCompile Include="stdafx.cpp">
|
250
111
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
251
|
-
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
252
|
-
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">Create</PrecompiledHeader>
|
253
|
-
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">Create</PrecompiledHeader>
|
254
112
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
255
|
-
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
256
113
|
</ClCompile>
|
257
114
|
<ClCompile Include="StringHelperTest.cpp" />
|
258
115
|
<ClCompile Include="UiaDll.Test.cpp" />
|
data/ext/UiaDll/UiaDll.sln
CHANGED
@@ -15,9 +15,6 @@ Global
|
|
15
15
|
Debug|Any CPU = Debug|Any CPU
|
16
16
|
Debug|Mixed Platforms = Debug|Mixed Platforms
|
17
17
|
Debug|Win32 = Debug|Win32
|
18
|
-
Release x64|Any CPU = Release x64|Any CPU
|
19
|
-
Release x64|Mixed Platforms = Release x64|Mixed Platforms
|
20
|
-
Release x64|Win32 = Release x64|Win32
|
21
18
|
Release|Any CPU = Release|Any CPU
|
22
19
|
Release|Mixed Platforms = Release|Mixed Platforms
|
23
20
|
Release|Win32 = Release|Win32
|
@@ -28,11 +25,6 @@ Global
|
|
28
25
|
{16531A20-39FB-4BDB-8F1C-E2D619BBCF58}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
29
26
|
{16531A20-39FB-4BDB-8F1C-E2D619BBCF58}.Debug|Win32.ActiveCfg = Debug|Win32
|
30
27
|
{16531A20-39FB-4BDB-8F1C-E2D619BBCF58}.Debug|Win32.Build.0 = Debug|Win32
|
31
|
-
{16531A20-39FB-4BDB-8F1C-E2D619BBCF58}.Release x64|Any CPU.ActiveCfg = Release x64|Win32
|
32
|
-
{16531A20-39FB-4BDB-8F1C-E2D619BBCF58}.Release x64|Mixed Platforms.ActiveCfg = Release x64|x64
|
33
|
-
{16531A20-39FB-4BDB-8F1C-E2D619BBCF58}.Release x64|Mixed Platforms.Build.0 = Release x64|x64
|
34
|
-
{16531A20-39FB-4BDB-8F1C-E2D619BBCF58}.Release x64|Win32.ActiveCfg = Release x64|Win32
|
35
|
-
{16531A20-39FB-4BDB-8F1C-E2D619BBCF58}.Release x64|Win32.Build.0 = Release x64|Win32
|
36
28
|
{16531A20-39FB-4BDB-8F1C-E2D619BBCF58}.Release|Any CPU.ActiveCfg = Release|Win32
|
37
29
|
{16531A20-39FB-4BDB-8F1C-E2D619BBCF58}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
38
30
|
{16531A20-39FB-4BDB-8F1C-E2D619BBCF58}.Release|Mixed Platforms.Build.0 = Release|Win32
|
@@ -43,11 +35,6 @@ Global
|
|
43
35
|
{C2D567A8-B059-41A8-B9F5-FF4F8F961C1F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
44
36
|
{C2D567A8-B059-41A8-B9F5-FF4F8F961C1F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
45
37
|
{C2D567A8-B059-41A8-B9F5-FF4F8F961C1F}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
46
|
-
{C2D567A8-B059-41A8-B9F5-FF4F8F961C1F}.Release x64|Any CPU.ActiveCfg = Release x64|Any CPU
|
47
|
-
{C2D567A8-B059-41A8-B9F5-FF4F8F961C1F}.Release x64|Any CPU.Build.0 = Release x64|Any CPU
|
48
|
-
{C2D567A8-B059-41A8-B9F5-FF4F8F961C1F}.Release x64|Mixed Platforms.ActiveCfg = Release x64|Any CPU
|
49
|
-
{C2D567A8-B059-41A8-B9F5-FF4F8F961C1F}.Release x64|Mixed Platforms.Build.0 = Release x64|Any CPU
|
50
|
-
{C2D567A8-B059-41A8-B9F5-FF4F8F961C1F}.Release x64|Win32.ActiveCfg = Release x64|Any CPU
|
51
38
|
{C2D567A8-B059-41A8-B9F5-FF4F8F961C1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
52
39
|
{C2D567A8-B059-41A8-B9F5-FF4F8F961C1F}.Release|Any CPU.Build.0 = Release|Any CPU
|
53
40
|
{C2D567A8-B059-41A8-B9F5-FF4F8F961C1F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
@@ -58,10 +45,6 @@ Global
|
|
58
45
|
{E83CF3F7-74C6-4333-89E3-36C6297F0A06}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
59
46
|
{E83CF3F7-74C6-4333-89E3-36C6297F0A06}.Debug|Win32.ActiveCfg = Debug|Win32
|
60
47
|
{E83CF3F7-74C6-4333-89E3-36C6297F0A06}.Debug|Win32.Build.0 = Debug|Win32
|
61
|
-
{E83CF3F7-74C6-4333-89E3-36C6297F0A06}.Release x64|Any CPU.ActiveCfg = Release x64|Win32
|
62
|
-
{E83CF3F7-74C6-4333-89E3-36C6297F0A06}.Release x64|Mixed Platforms.ActiveCfg = Debug|x64
|
63
|
-
{E83CF3F7-74C6-4333-89E3-36C6297F0A06}.Release x64|Win32.ActiveCfg = Release x64|Win32
|
64
|
-
{E83CF3F7-74C6-4333-89E3-36C6297F0A06}.Release x64|Win32.Build.0 = Release x64|Win32
|
65
48
|
{E83CF3F7-74C6-4333-89E3-36C6297F0A06}.Release|Any CPU.ActiveCfg = Release|Win32
|
66
49
|
{E83CF3F7-74C6-4333-89E3-36C6297F0A06}.Release|Mixed Platforms.ActiveCfg = Debug|Win32
|
67
50
|
{E83CF3F7-74C6-4333-89E3-36C6297F0A06}.Release|Mixed Platforms.Build.0 = Debug|Win32
|
@@ -1,7 +1,6 @@
|
|
1
1
|
#pragma once
|
2
2
|
#include <list>
|
3
3
|
using namespace std;
|
4
|
-
using namespace System::Windows::Automation;
|
5
4
|
|
6
5
|
typedef struct _SearchCondition {
|
7
6
|
int propertyId;
|
@@ -67,7 +66,7 @@ typedef struct _SearchCondition {
|
|
67
66
|
}
|
68
67
|
|
69
68
|
static _SearchCondition* FromControlTypes(list<const int>& controlTypes) {
|
70
|
-
return new SearchCondition(AutomationElement::ControlTypeProperty->Id, controlTypes);
|
69
|
+
return new SearchCondition(System::Windows::Automation::AutomationElement::ControlTypeProperty->Id, controlTypes);
|
71
70
|
}
|
72
71
|
|
73
72
|
void Reset(const int id) {
|
@@ -5,26 +5,10 @@
|
|
5
5
|
<Configuration>Debug</Configuration>
|
6
6
|
<Platform>Win32</Platform>
|
7
7
|
</ProjectConfiguration>
|
8
|
-
<ProjectConfiguration Include="Debug|x64">
|
9
|
-
<Configuration>Debug</Configuration>
|
10
|
-
<Platform>x64</Platform>
|
11
|
-
</ProjectConfiguration>
|
12
|
-
<ProjectConfiguration Include="Release x64|Win32">
|
13
|
-
<Configuration>Release x64</Configuration>
|
14
|
-
<Platform>Win32</Platform>
|
15
|
-
</ProjectConfiguration>
|
16
|
-
<ProjectConfiguration Include="Release x64|x64">
|
17
|
-
<Configuration>Release x64</Configuration>
|
18
|
-
<Platform>x64</Platform>
|
19
|
-
</ProjectConfiguration>
|
20
8
|
<ProjectConfiguration Include="Release|Win32">
|
21
9
|
<Configuration>Release</Configuration>
|
22
10
|
<Platform>Win32</Platform>
|
23
11
|
</ProjectConfiguration>
|
24
|
-
<ProjectConfiguration Include="Release|x64">
|
25
|
-
<Configuration>Release</Configuration>
|
26
|
-
<Platform>x64</Platform>
|
27
|
-
</ProjectConfiguration>
|
28
12
|
</ItemGroup>
|
29
13
|
<PropertyGroup Label="Globals">
|
30
14
|
<ProjectGuid>{16531A20-39FB-4BDB-8F1C-E2D619BBCF58}</ProjectGuid>
|
@@ -40,13 +24,6 @@
|
|
40
24
|
<CLRSupport>true</CLRSupport>
|
41
25
|
<CharacterSet>Unicode</CharacterSet>
|
42
26
|
</PropertyGroup>
|
43
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
44
|
-
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
45
|
-
<UseDebugLibraries>true</UseDebugLibraries>
|
46
|
-
<PlatformToolset>v110</PlatformToolset>
|
47
|
-
<CLRSupport>true</CLRSupport>
|
48
|
-
<CharacterSet>Unicode</CharacterSet>
|
49
|
-
</PropertyGroup>
|
50
27
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
51
28
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
52
29
|
<UseDebugLibraries>false</UseDebugLibraries>
|
@@ -54,67 +31,22 @@
|
|
54
31
|
<CLRSupport>true</CLRSupport>
|
55
32
|
<CharacterSet>Unicode</CharacterSet>
|
56
33
|
</PropertyGroup>
|
57
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
58
|
-
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
59
|
-
<UseDebugLibraries>false</UseDebugLibraries>
|
60
|
-
<PlatformToolset>v110</PlatformToolset>
|
61
|
-
<CLRSupport>true</CLRSupport>
|
62
|
-
<CharacterSet>Unicode</CharacterSet>
|
63
|
-
</PropertyGroup>
|
64
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'" Label="Configuration">
|
65
|
-
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
66
|
-
<UseDebugLibraries>false</UseDebugLibraries>
|
67
|
-
<PlatformToolset>v110</PlatformToolset>
|
68
|
-
<CLRSupport>true</CLRSupport>
|
69
|
-
<CharacterSet>Unicode</CharacterSet>
|
70
|
-
</PropertyGroup>
|
71
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'" Label="Configuration">
|
72
|
-
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
73
|
-
<UseDebugLibraries>false</UseDebugLibraries>
|
74
|
-
<PlatformToolset>v110</PlatformToolset>
|
75
|
-
<CLRSupport>true</CLRSupport>
|
76
|
-
<CharacterSet>Unicode</CharacterSet>
|
77
|
-
</PropertyGroup>
|
78
34
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
79
35
|
<ImportGroup Label="ExtensionSettings">
|
80
36
|
</ImportGroup>
|
81
37
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
82
38
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
83
39
|
</ImportGroup>
|
84
|
-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
85
|
-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
86
|
-
</ImportGroup>
|
87
40
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
88
41
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
89
42
|
</ImportGroup>
|
90
|
-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
91
|
-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
92
|
-
</ImportGroup>
|
93
|
-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'" Label="PropertySheets">
|
94
|
-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
95
|
-
</ImportGroup>
|
96
|
-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'" Label="PropertySheets">
|
97
|
-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
98
|
-
</ImportGroup>
|
99
43
|
<PropertyGroup Label="UserMacros" />
|
100
44
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
101
45
|
<LinkIncremental>true</LinkIncremental>
|
102
46
|
</PropertyGroup>
|
103
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
104
|
-
<LinkIncremental>true</LinkIncremental>
|
105
|
-
</PropertyGroup>
|
106
47
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
107
48
|
<LinkIncremental>false</LinkIncremental>
|
108
49
|
</PropertyGroup>
|
109
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
110
|
-
<LinkIncremental>false</LinkIncremental>
|
111
|
-
</PropertyGroup>
|
112
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">
|
113
|
-
<LinkIncremental>false</LinkIncremental>
|
114
|
-
</PropertyGroup>
|
115
|
-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">
|
116
|
-
<LinkIncremental>false</LinkIncremental>
|
117
|
-
</PropertyGroup>
|
118
50
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
119
51
|
<ClCompile>
|
120
52
|
<WarningLevel>Level3</WarningLevel>
|
@@ -127,19 +59,6 @@
|
|
127
59
|
<AdditionalDependencies />
|
128
60
|
</Link>
|
129
61
|
</ItemDefinitionGroup>
|
130
|
-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
131
|
-
<ClCompile>
|
132
|
-
<WarningLevel>Level3</WarningLevel>
|
133
|
-
<Optimization>Disabled</Optimization>
|
134
|
-
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
135
|
-
<PrecompiledHeader>Use</PrecompiledHeader>
|
136
|
-
</ClCompile>
|
137
|
-
<Link>
|
138
|
-
<GenerateDebugInformation>true</GenerateDebugInformation>
|
139
|
-
<AdditionalDependencies>
|
140
|
-
</AdditionalDependencies>
|
141
|
-
</Link>
|
142
|
-
</ItemDefinitionGroup>
|
143
62
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
144
63
|
<ClCompile>
|
145
64
|
<WarningLevel>Level3</WarningLevel>
|
@@ -151,42 +70,6 @@
|
|
151
70
|
<AdditionalDependencies />
|
152
71
|
</Link>
|
153
72
|
</ItemDefinitionGroup>
|
154
|
-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
155
|
-
<ClCompile>
|
156
|
-
<WarningLevel>Level3</WarningLevel>
|
157
|
-
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
158
|
-
<PrecompiledHeader>Use</PrecompiledHeader>
|
159
|
-
</ClCompile>
|
160
|
-
<Link>
|
161
|
-
<GenerateDebugInformation>true</GenerateDebugInformation>
|
162
|
-
<AdditionalDependencies>
|
163
|
-
</AdditionalDependencies>
|
164
|
-
</Link>
|
165
|
-
</ItemDefinitionGroup>
|
166
|
-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">
|
167
|
-
<ClCompile>
|
168
|
-
<WarningLevel>Level3</WarningLevel>
|
169
|
-
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
170
|
-
<PrecompiledHeader>Use</PrecompiledHeader>
|
171
|
-
</ClCompile>
|
172
|
-
<Link>
|
173
|
-
<GenerateDebugInformation>true</GenerateDebugInformation>
|
174
|
-
<AdditionalDependencies>
|
175
|
-
</AdditionalDependencies>
|
176
|
-
</Link>
|
177
|
-
</ItemDefinitionGroup>
|
178
|
-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">
|
179
|
-
<ClCompile>
|
180
|
-
<WarningLevel>Level3</WarningLevel>
|
181
|
-
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
182
|
-
<PrecompiledHeader>Use</PrecompiledHeader>
|
183
|
-
</ClCompile>
|
184
|
-
<Link>
|
185
|
-
<GenerateDebugInformation>true</GenerateDebugInformation>
|
186
|
-
<AdditionalDependencies>
|
187
|
-
</AdditionalDependencies>
|
188
|
-
</Link>
|
189
|
-
</ItemDefinitionGroup>
|
190
73
|
<ItemGroup>
|
191
74
|
<Reference Include="System" />
|
192
75
|
<Reference Include="System.Core" />
|
@@ -219,11 +102,7 @@
|
|
219
102
|
<ClCompile Include="SelectionMethods.cpp" />
|
220
103
|
<ClCompile Include="Stdafx.cpp">
|
221
104
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
222
|
-
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
223
105
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
224
|
-
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
225
|
-
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">Create</PrecompiledHeader>
|
226
|
-
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">Create</PrecompiledHeader>
|
227
106
|
</ClCompile>
|
228
107
|
<ClCompile Include="TableItemMethods.cpp" />
|
229
108
|
<ClCompile Include="TableMethods.cpp" />
|
data/lib/uia/library.rb
CHANGED
@@ -7,8 +7,7 @@ module Uia
|
|
7
7
|
extend FFI::Library
|
8
8
|
|
9
9
|
def self.uia_directory
|
10
|
-
|
11
|
-
(File.dirname(__FILE__) + "/../../ext/UiaDll/#{flavor}")
|
10
|
+
File.dirname(__FILE__) + '/../../ext/UiaDll/Release'
|
12
11
|
end
|
13
12
|
|
14
13
|
ffi_lib File.join(uia_directory, 'UiaDll.dll')
|
@@ -202,4 +201,4 @@ module Uia
|
|
202
201
|
rescue LoadError
|
203
202
|
raise LoadError, 'You must install the Visual Studio 2012 C++ Runtime Environment to use the Uia gem (http://www.microsoft.com/en-us/download/details.aspx?id=30679)'
|
204
203
|
end
|
205
|
-
end
|
204
|
+
end
|
data/lib/uia/version.rb
CHANGED
data/spec/uia/element_spec.rb
CHANGED
@@ -61,22 +61,22 @@ describe Uia::Element do
|
|
61
61
|
Then { element.control_type == :window }
|
62
62
|
|
63
63
|
context 'unknown' do
|
64
|
-
Given { raw_element.
|
64
|
+
Given { allow(raw_element).to receive(:control_type_id).and_return(777) }
|
65
65
|
Then { element.control_type == :unknown }
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
69
|
context '#patterns' do
|
70
|
-
Then { element.patterns.
|
70
|
+
Then { expect(element.patterns).to match_array([:transform, :window]) }
|
71
71
|
|
72
72
|
context 'unknown' do
|
73
|
-
Given { raw_element.
|
74
|
-
Then { element.patterns.
|
73
|
+
Given { allow(raw_element).to receive(:pattern_ids).and_return([7777]) }
|
74
|
+
Then { expect(element.patterns).to eq([:unknown]) }
|
75
75
|
end
|
76
76
|
|
77
77
|
context '#as' do
|
78
78
|
When(:cast) { element.as :toggle }
|
79
|
-
Then { cast.
|
79
|
+
Then { expect(cast).to have_failed UnsupportedPattern, "Pattern toggle not found in [:window, :transform]" }
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
@@ -141,7 +141,7 @@ describe Uia::Element do
|
|
141
141
|
|
142
142
|
context 'invalid' do
|
143
143
|
When(:bad_locator) { element.find(bad_locator: 123) }
|
144
|
-
Then { bad_locator.
|
144
|
+
Then { expect(bad_locator).to have_failed BadLocator, "{:bad_locator=>123} is not a valid locator" }
|
145
145
|
end
|
146
146
|
|
147
147
|
context 'limiting scope' do
|
data/spec/uia/keys_spec.rb
CHANGED
@@ -25,6 +25,6 @@ describe Uia::Keys do
|
|
25
25
|
|
26
26
|
context 'invalid' do
|
27
27
|
When(:bad_keys) { encode('something', :bad_key) }
|
28
|
-
Then { bad_keys.
|
28
|
+
Then { expect(bad_keys).to have_failed InvalidKey, "#{:bad_key} is not a valid key" }
|
29
29
|
end
|
30
30
|
end
|
data/spec/uia_spec.rb
CHANGED
@@ -31,13 +31,13 @@ describe Uia do
|
|
31
31
|
|
32
32
|
context 'can search descendants' do
|
33
33
|
Given(:element_with_no_handle) { Uia.find_element(id: 'MainFormWindow').find(name: 'Parent Two') }
|
34
|
-
Then { element_with_no_handle.click.
|
34
|
+
Then { expect(element_with_no_handle.click).to be true }
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
context 'by window handle' do
|
39
39
|
Then { expect(Uia.find_element(handle: main_window.handle)).to be_instance_of(Element) }
|
40
|
-
Then { expect { Uia.find_element(handle: 0x0) }.to raise_error }
|
40
|
+
Then { expect { Uia.find_element(handle: 0x0) }.to raise_error(RuntimeError, /hwnd cannot be IntPtr.Zero or null/) }
|
41
41
|
end
|
42
42
|
|
43
43
|
context 'by title' do
|
@@ -48,7 +48,7 @@ describe Uia do
|
|
48
48
|
|
49
49
|
context 'invalid locators' do
|
50
50
|
When(:bad_input) { Uia.find_element(bad: 123) }
|
51
|
-
Then { bad_input.
|
51
|
+
Then { expect(bad_input).to have_failed(Uia::BadLocator, '{:bad=>123} is not a valid locator') }
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
data/uia.gemspec
CHANGED
@@ -15,9 +15,7 @@ Gem::Specification.new do |spec|
|
|
15
15
|
|
16
16
|
binaries = [
|
17
17
|
'ext/UiaDll/Release/UiaDll.dll',
|
18
|
-
'ext/UiaDll/Release/UIA.Helper.dll'
|
19
|
-
'ext/UiaDll/x64/Release x64/UiaDll.dll',
|
20
|
-
'ext/UiaDll/x64/Release x64/UIA.Helper.dll'
|
18
|
+
'ext/UiaDll/Release/UIA.Helper.dll'
|
21
19
|
]
|
22
20
|
|
23
21
|
exclude = lambda {|p| p =~ /(gtest)|(gmock)/i }
|
@@ -27,13 +25,13 @@ Gem::Specification.new do |spec|
|
|
27
25
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
28
26
|
spec.require_paths = ['lib']
|
29
27
|
|
30
|
-
spec.add_runtime_dependency 'ffi', '~> 1.
|
31
|
-
spec.add_runtime_dependency 'require_all'
|
28
|
+
spec.add_runtime_dependency 'ffi', '~> 1.11.2'
|
29
|
+
spec.add_runtime_dependency 'require_all', '~> 3.0'
|
32
30
|
|
33
|
-
spec.add_development_dependency 'bundler', '
|
34
|
-
spec.add_development_dependency 'rake'
|
35
|
-
spec.add_development_dependency 'rspec', '~>
|
36
|
-
spec.add_development_dependency 'rspec-given'
|
37
|
-
spec.add_development_dependency 'childprocess'
|
38
|
-
spec.add_development_dependency 'albacore', '~>
|
31
|
+
spec.add_development_dependency 'bundler', '>= 1.3'
|
32
|
+
spec.add_development_dependency 'rake', '~> 10.5'
|
33
|
+
spec.add_development_dependency 'rspec', '~> 3.9'
|
34
|
+
spec.add_development_dependency 'rspec-given', '~> 3.8'
|
35
|
+
spec.add_development_dependency 'childprocess', '~> 3.0'
|
36
|
+
spec.add_development_dependency 'albacore', '~> 3.0.1'
|
39
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7
|
4
|
+
version: '0.7'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Levi Wilson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -16,112 +16,112 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.11.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.11.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: require_all
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '3.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '3.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '10.5'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '10.5'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '3.9'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '3.9'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec-given
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '3.8'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '3.8'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: childprocess
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
103
|
+
version: '3.0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
110
|
+
version: '3.0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: albacore
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: 3.0.1
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: 3.0.1
|
125
125
|
description: A low-level wrapper around Microsoft UI Automation for ruby
|
126
126
|
email:
|
127
127
|
- levi@leviwilson.com
|
@@ -196,8 +196,6 @@ files:
|
|
196
196
|
- ext/UiaDll/UiaDll/ValuePatternMethods.cpp
|
197
197
|
- ext/UiaDll/UiaDll/WindowMethods.cpp
|
198
198
|
- ext/UiaDll/UiaDll/app.rc
|
199
|
-
- ext/UiaDll/x64/Release x64/UIA.Helper.dll
|
200
|
-
- ext/UiaDll/x64/Release x64/UiaDll.dll
|
201
199
|
- lib/core_ext/array.rb
|
202
200
|
- lib/core_ext/module.rb
|
203
201
|
- lib/core_ext/string.rb
|
@@ -264,12 +262,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
264
262
|
version: '0'
|
265
263
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
266
264
|
requirements:
|
267
|
-
- - "
|
265
|
+
- - ">="
|
268
266
|
- !ruby/object:Gem::Version
|
269
|
-
version:
|
267
|
+
version: '0'
|
270
268
|
requirements: []
|
271
269
|
rubyforge_project:
|
272
|
-
rubygems_version: 2.
|
270
|
+
rubygems_version: 2.5.2
|
273
271
|
signing_key:
|
274
272
|
specification_version: 4
|
275
273
|
summary: A low-level wrapper around Microsoft UI Automation for ruby
|