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 +4 -4
- data/License.txt +1 -1
- data/README.md +3 -0
- data/lib/rukuli/clickable.rb +22 -0
- data/lib/rukuli/key_code.rb +1 -0
- data/lib/rukuli/version.rb +1 -1
- data/spec/rukuli/clickable_spec.rb +8 -0
- data/spec/rukuli/typeable_spec.rb +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e0ba7790514cd10956cab9dc78488058c450f6e
|
4
|
+
data.tar.gz: c7ac9a218618fe9c025b8d261ca75e4684972540
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0a50110093e1a900bf976b7717daa18117880eac967ca6bc139b499cdf4aefcb33603d00da0dda0d31f9c6235cecc1daf179fd66ffbc5b4750aa2d1538add2d
|
7
|
+
data.tar.gz: de1c8dfae76da64233f62d6358cb9b90288aad706cf327ace4d3fc34da6c41af9ee5547f5a09439b5e7b771025c31f83ee1ed5bfbf16ba77d40a5a0aa8d49432
|
data/License.txt
CHANGED
data/README.md
CHANGED
data/lib/rukuli/clickable.rb
CHANGED
@@ -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
|
data/lib/rukuli/key_code.rb
CHANGED
data/lib/rukuli/version.rb
CHANGED
@@ -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.
|
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:
|
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.
|
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:
|