uia 0.1 → 0.1.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/ChangeLog CHANGED
@@ -1,4 +1,8 @@
1
- === Verions 0.1 / 2013-02-06
1
+ === Version 0.1.1 / 2013-02-07
2
+ * Bug Fixes
3
+ * Prior to trying to click on an element, it needs to scroll to and focus it first
4
+
5
+ === Version 0.1 / 2013-02-06
2
6
  * Enhancements
3
7
  * changed #click to be clickable point only
4
8
  * added #click_center to try to click in the bounding_rectangle
Binary file
@@ -23,19 +23,21 @@ namespace UIA.Helper
23
23
 
24
24
  public static void ClickClickablePoint(AutomationElement element)
25
25
  {
26
- Click(element, element.GetClickablePoint());
26
+ Click(element, element.GetClickablePoint);
27
27
  }
28
28
 
29
29
  public static void ClickCenter(AutomationElement element)
30
30
  {
31
- Click(element, Center(element));
31
+ Click(element, () => Center(element));
32
32
  }
33
33
 
34
- private static void Click(AutomationElement element, Point point)
34
+ private static void Click(AutomationElement element, Func<Point> GetPoint)
35
35
  {
36
36
  element.ScrollToIfPossible();
37
37
  element.TryToFocus();
38
38
 
39
+ var point = GetPoint();
40
+
39
41
  Cursor.Position = new System.Drawing.Point((int) point.X, (int) point.Y);
40
42
  mouse_event(MOUSEEVENTLF_LEFTDOWN, 0, 0, 0, 0);
41
43
  mouse_event(MOUSEEVENTLF_LEFTUP, 0, 0, 0, 0);
data/lib/uia/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Uia
2
- VERSION = '0.1'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uia
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -249,7 +249,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
249
249
  version: '0'
250
250
  segments:
251
251
  - 0
252
- hash: 258330671
252
+ hash: 302462739
253
253
  required_rubygems_version: !ruby/object:Gem::Requirement
254
254
  none: false
255
255
  requirements:
@@ -258,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
258
258
  version: '0'
259
259
  segments:
260
260
  - 0
261
- hash: 258330671
261
+ hash: 302462739
262
262
  requirements: []
263
263
  rubyforge_project:
264
264
  rubygems_version: 1.8.24