sikuli 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sikuli/clickable.rb +36 -0
- data/lib/sikuli/key_code.rb +2 -0
- data/lib/sikuli/version.rb +1 -1
- data/spec/sikuli/clickable_spec.rb +10 -2
- metadata +84 -78
data/lib/sikuli/clickable.rb
CHANGED
@@ -86,8 +86,44 @@ module Sikuli
|
|
86
86
|
)
|
87
87
|
end
|
88
88
|
|
89
|
+
# Public: Simulates turning of the mouse wheel up
|
90
|
+
#
|
91
|
+
# steps - Fixnum representing the number of steps to turn the mouse wheel
|
92
|
+
#
|
93
|
+
# Examples
|
94
|
+
#
|
95
|
+
# region.wheel_up(10)
|
96
|
+
#
|
97
|
+
# Returns nothing
|
98
|
+
def wheel_up(steps = 1)
|
99
|
+
@java_obj.wheel(-1, steps)
|
100
|
+
end
|
101
|
+
|
102
|
+
# Public: Simulates turning of the mouse wheel down
|
103
|
+
#
|
104
|
+
# steps - Fixnum representing the number of steps to turn the mouse wheel
|
105
|
+
#
|
106
|
+
# Examples
|
107
|
+
#
|
108
|
+
# region.wheel_down(10)
|
109
|
+
#
|
110
|
+
# Returns nothing
|
111
|
+
def wheel_down(steps = 1)
|
112
|
+
@java_obj.wheel(1, steps)
|
113
|
+
end
|
114
|
+
|
89
115
|
private
|
90
116
|
|
117
|
+
# Private: turns the mouse wheel
|
118
|
+
#
|
119
|
+
# direction - Fixnum represeting direction to turn wheel
|
120
|
+
# steps - the number of steps to turn the mouse wheel
|
121
|
+
#
|
122
|
+
# Returns nothing
|
123
|
+
def wheel(direction, steps)
|
124
|
+
@java_obj.wheel(direction, steps)
|
125
|
+
end
|
126
|
+
|
91
127
|
# Private: clicks on a matched Region based on an image based search
|
92
128
|
#
|
93
129
|
# filename - A String representation of the filename of the region to
|
data/lib/sikuli/key_code.rb
CHANGED
data/lib/sikuli/version.rb
CHANGED
@@ -29,12 +29,20 @@ describe Sikuli::Region, "#Clickable" do
|
|
29
29
|
lambda { @region.click("apple.png") }.should
|
30
30
|
raise_error(Sikuli::ImageNotFound, "The image 'apple.png' did not match in this region.")
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
33
|
it "should perform a click and hold on an image" do
|
34
34
|
lambda { @region.click_and_hold(2, "green_apple.png") }.should_not raise_error
|
35
35
|
end
|
36
|
-
|
36
|
+
|
37
37
|
it "should perform a click and hold on a point" do
|
38
38
|
lambda { @region.click_and_hold(2, 100, 100) }.should_not raise_error
|
39
39
|
end
|
40
|
+
|
41
|
+
it "should simulate a mouse scroll wheel up event" do
|
42
|
+
lambda { @region.wheel_up(10) }.should_not raise_error
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should simulate a mouse scroll wheel down event" do
|
46
|
+
lambda { @region.wheel_down(10) }.should_not raise_error
|
47
|
+
end
|
40
48
|
end
|
metadata
CHANGED
@@ -1,98 +1,104 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: sikuli
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.2
|
3
|
+
version: !ruby/object:Gem::Version
|
5
4
|
prerelease:
|
5
|
+
version: 0.2.3
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
- Chas Lemley
|
7
|
+
authors:
|
8
|
+
- Chas Lemley
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
email:
|
28
|
-
- chas.lemley@gmail.com
|
12
|
+
|
13
|
+
date: 2012-02-06 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rspec
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
type: :development
|
25
|
+
version_requirements: *id001
|
26
|
+
description: Sikuli allows you to interact with your application's user interface using image based search to automate user actions.
|
27
|
+
email:
|
28
|
+
- chas.lemley@gmail.com
|
29
29
|
executables: []
|
30
|
+
|
30
31
|
extensions: []
|
32
|
+
|
31
33
|
extra_rdoc_files: []
|
32
|
-
|
33
|
-
|
34
|
-
-
|
35
|
-
-
|
36
|
-
-
|
37
|
-
-
|
38
|
-
- lib/sikuli
|
39
|
-
- lib/sikuli/
|
40
|
-
- lib/sikuli/
|
41
|
-
- lib/sikuli/
|
42
|
-
- lib/sikuli/
|
43
|
-
- lib/sikuli/
|
44
|
-
- lib/sikuli/
|
45
|
-
- lib/sikuli/
|
46
|
-
- lib/sikuli/
|
47
|
-
- lib/sikuli/
|
48
|
-
- lib/sikuli/
|
49
|
-
- sikuli.
|
50
|
-
-
|
51
|
-
- spec/sikuli/
|
52
|
-
- spec/sikuli/
|
53
|
-
- spec/sikuli/
|
54
|
-
- spec/sikuli/
|
55
|
-
- spec/sikuli/
|
56
|
-
- spec/sikuli/
|
57
|
-
- spec/
|
58
|
-
- spec/
|
59
|
-
- spec/support/images/
|
60
|
-
- spec/support/images/
|
61
|
-
- spec/support/images/
|
34
|
+
|
35
|
+
files:
|
36
|
+
- .gitignore
|
37
|
+
- Gemfile
|
38
|
+
- README.md
|
39
|
+
- Rakefile
|
40
|
+
- lib/sikuli.rb
|
41
|
+
- lib/sikuli/app.rb
|
42
|
+
- lib/sikuli/clickable.rb
|
43
|
+
- lib/sikuli/config.rb
|
44
|
+
- lib/sikuli/exception.rb
|
45
|
+
- lib/sikuli/key_code.rb
|
46
|
+
- lib/sikuli/region.rb
|
47
|
+
- lib/sikuli/screen.rb
|
48
|
+
- lib/sikuli/searchable.rb
|
49
|
+
- lib/sikuli/sikuli-script.jar
|
50
|
+
- lib/sikuli/typeable.rb
|
51
|
+
- lib/sikuli/version.rb
|
52
|
+
- sikuli.gemspec
|
53
|
+
- spec/sikuli/app_spec.rb
|
54
|
+
- spec/sikuli/clickable_spec.rb
|
55
|
+
- spec/sikuli/config_spec.rb
|
56
|
+
- spec/sikuli/region_spec.rb
|
57
|
+
- spec/sikuli/screen_spec.rb
|
58
|
+
- spec/sikuli/searchable_spec.rb
|
59
|
+
- spec/sikuli/typeable_spec.rb
|
60
|
+
- spec/spec_helper.rb
|
61
|
+
- spec/support/images/apple.png
|
62
|
+
- spec/support/images/green_apple.png
|
63
|
+
- spec/support/images/smiley_face.png
|
64
|
+
- spec/support/images/test_area.jpg
|
62
65
|
homepage: https://github.com/chaslemley/sikuli_ruby
|
63
66
|
licenses: []
|
67
|
+
|
64
68
|
post_install_message:
|
65
69
|
rdoc_options: []
|
66
|
-
|
67
|
-
|
68
|
-
|
70
|
+
|
71
|
+
require_paths:
|
72
|
+
- lib
|
73
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
69
74
|
none: false
|
70
|
-
requirements:
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: "0"
|
79
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
80
|
none: false
|
76
|
-
requirements:
|
77
|
-
|
78
|
-
|
79
|
-
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: "0"
|
80
85
|
requirements: []
|
86
|
+
|
81
87
|
rubyforge_project: sikuli
|
82
|
-
rubygems_version: 1.8.
|
88
|
+
rubygems_version: 1.8.9
|
83
89
|
signing_key:
|
84
90
|
specification_version: 3
|
85
91
|
summary: Ruby wrapper for Sikuli GUI automation library
|
86
|
-
test_files:
|
87
|
-
- spec/sikuli/app_spec.rb
|
88
|
-
- spec/sikuli/clickable_spec.rb
|
89
|
-
- spec/sikuli/config_spec.rb
|
90
|
-
- spec/sikuli/region_spec.rb
|
91
|
-
- spec/sikuli/screen_spec.rb
|
92
|
-
- spec/sikuli/searchable_spec.rb
|
93
|
-
- spec/sikuli/typeable_spec.rb
|
94
|
-
- spec/spec_helper.rb
|
95
|
-
- spec/support/images/apple.png
|
96
|
-
- spec/support/images/green_apple.png
|
97
|
-
- spec/support/images/smiley_face.png
|
98
|
-
- spec/support/images/test_area.jpg
|
92
|
+
test_files:
|
93
|
+
- spec/sikuli/app_spec.rb
|
94
|
+
- spec/sikuli/clickable_spec.rb
|
95
|
+
- spec/sikuli/config_spec.rb
|
96
|
+
- spec/sikuli/region_spec.rb
|
97
|
+
- spec/sikuli/screen_spec.rb
|
98
|
+
- spec/sikuli/searchable_spec.rb
|
99
|
+
- spec/sikuli/typeable_spec.rb
|
100
|
+
- spec/spec_helper.rb
|
101
|
+
- spec/support/images/apple.png
|
102
|
+
- spec/support/images/green_apple.png
|
103
|
+
- spec/support/images/smiley_face.png
|
104
|
+
- spec/support/images/test_area.jpg
|