rukuli 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76f13492ca5ed8e15dcb6aaca33ee5a608d3098e
4
- data.tar.gz: 581127c00256e825a7c15f3e3631a028ad3df715
3
+ metadata.gz: 5e0ba7790514cd10956cab9dc78488058c450f6e
4
+ data.tar.gz: c7ac9a218618fe9c025b8d261ca75e4684972540
5
5
  SHA512:
6
- metadata.gz: e6af83acc9f442cc43614a7e6fdc58f3c9894f350171c31079b7d6d37c1f38f795ceeb5cd6d9f161faa387e79944b99d758f0396428066970babe705127b767d
7
- data.tar.gz: e708294c7642e3887def93c16613347f45cfb45e4de496bdbf5cde5d08ebc27049ff18baf07b16e5d8c9b8c58a31bac83edb90947565ef830abe0360130ad6f1
6
+ metadata.gz: f0a50110093e1a900bf976b7717daa18117880eac967ca6bc139b499cdf4aefcb33603d00da0dda0d31f9c6235cecc1daf179fd66ffbc5b4750aa2d1538add2d
7
+ data.tar.gz: de1c8dfae76da64233f62d6358cb9b90288aad706cf327ace4d3fc34da6c41af9ee5547f5a09439b5e7b771025c31f83ee1ed5bfbf16ba77d40a5a0aa8d49432
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 - 2014 André Anastácio
1
+ Copyright (c) 2013 - 2015 André Anastácio
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,3 +1,6 @@
1
+ # Note
2
+ Now Sikuli supports ruby in IDE [More info](https://github.com/andreanastacio/Rukuli/issues/19)
3
+
1
4
  # Rukuli
2
5
 
3
6
  [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/andreanastacio/rukuli/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
@@ -44,6 +44,28 @@ module Rukuli
44
44
  end
45
45
  end
46
46
 
47
+ # Public: Performs a right click on an image match or point (x, y)
48
+ #
49
+ # args - String representing filename of image to find and click
50
+ # args - Fixnum, Fixnum representing x and y coordinates within
51
+ # a Region (0,0) is the top left
52
+ #
53
+ # Examples
54
+ #
55
+ # region.right_click('smile.png')
56
+ # region.right_click(123, 432)
57
+ #
58
+ # Returns nothing
59
+ def right_click(*args)
60
+ case args.length
61
+ when 1 then @java_obj.rightClick(args[0], 0)
62
+ when 2 then @java_obj.rightClick(offset_location(args[0], args[1]))
63
+ else raise ArgumentError
64
+ end
65
+ rescue NativeException => e
66
+ raise_exception e, args[0]
67
+ end
68
+
47
69
  # Public: Performs a click and hold on an image match or point (x, y)
48
70
  #
49
71
  # args - String representing filename of image to find and click
@@ -15,6 +15,7 @@ module Rukuli
15
15
  KEY_BACKSPACE = Key::BACKSPACE
16
16
  KEY_RETURN = Key::ENTER
17
17
  KEY_ESC = Key::ESC
18
+ KEY_TAB = Key::TAB
18
19
  LEFT_ARROW = Key::LEFT
19
20
  RIGHT_ARROW = Key::RIGHT
20
21
  UP_ARROW = Key::UP
@@ -1,3 +1,3 @@
1
1
  module Rukuli
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -17,6 +17,14 @@ describe Rukuli::Region, "#Clickable" do
17
17
  expect { @region.double_click("smiley_face.png") }.not_to raise_error
18
18
  end
19
19
 
20
+ it "should perform a right click at 10, 10" do
21
+ expect { @region.right_click(10, 10) }.not_to raise_error
22
+ end
23
+
24
+ it "should perform a right click on an image" do
25
+ expect { @region.right_click("smiley_face.png") }.not_to raise_error
26
+ end
27
+
20
28
  it "should perform a drag and drop" do
21
29
  expect { @region.drag_drop(12, 12, 491, 491) }.not_to raise_error
22
30
  end
@@ -26,5 +26,6 @@ describe Rukuli::Region, "#Typeable" do
26
26
  it("backspace") { @region.type(Rukuli::KEY_BACKSPACE * 50) }
27
27
  it("return") { @region.type(Rukuli::KEY_RETURN) }
28
28
  it("left arrow") { @region.type(Rukuli::LEFT_ARROW) }
29
+ it("tab") { @region.type(Rukuli::KEY_TAB) }
29
30
  end
30
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rukuli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chas Lemley
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-05 00:00:00.000000000 Z
12
+ date: 2015-01-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  version: '0'
85
85
  requirements: []
86
86
  rubyforge_project: rukuli
87
- rubygems_version: 2.2.2
87
+ rubygems_version: 2.4.5
88
88
  signing_key:
89
89
  specification_version: 4
90
90
  summary: Ruby wrapper for Sikuli GUI automation library
@@ -102,3 +102,4 @@ test_files:
102
102
  - spec/support/images/green_apple.png
103
103
  - spec/support/images/smiley_face.png
104
104
  - spec/support/images/test_area.jpg
105
+ has_rdoc: