rautomation 0.15.0 → 1.1.0

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
- SHA1:
3
- metadata.gz: 3c6d6a52e58f96779bd37c86b30ba8f392dd0191
4
- data.tar.gz: fbc26ee037eef080677cf8997aeb924f02bd1360
2
+ SHA256:
3
+ metadata.gz: 53dcc9c7fb0ad6599fc38219e071f7708d25efcc734d0e59b460597291bd3cd3
4
+ data.tar.gz: c8653b31a06ea43617985b3722750f30005670ed8b468a9bdd22df4b3b46cd9a
5
5
  SHA512:
6
- metadata.gz: 652ed3ab3c3624056af6166a4a2c4569f0a0e3c02201d69a3bfba9d3f82be7b73f255f6c7fa7188b6c98c43e6f496b2fab78d562637cac2ccfc086a9b8ecc2d2
7
- data.tar.gz: 1d10710a01cdebfed601261cdb34bd5a3e3e79cfb979f2ad4be6e797c1aad1804a9f8dfab43359e8267f86378021f71ccd96b453bdacc4974792e58e9543daa5
6
+ metadata.gz: 2e069e4ec814e18538c3f73414c3745092707522bad5f1f83867fb0f76bdb6fb79a3ad5ac58e6a4db45e2f13d3bac3e3e248bcbfd6fb3afe422e0350ea3c380b
7
+ data.tar.gz: c1219736522287e6c680a31edbc7fdf992029c53df7c0cdb10670c41863cd16daeadad1a53a13c4d57a3c6b2b6a36839f925f21d05a54a5357fbf1666068c436
data/.document CHANGED
@@ -1,4 +1,4 @@
1
- README.rdoc
1
+ README.md
2
2
  lib/**/*.rb
3
3
  bin/*
4
4
  features/**/*.feature
data/.gitignore CHANGED
@@ -1,36 +1,37 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- /coverage
18
- /rdoc
19
- /pkg
20
-
21
- ## PROJECT::SPECIFIC
22
- /.idea/*
23
-
24
- /.yardoc/
25
- /doc/
26
-
27
- ## VisualStudio
28
- Debug
29
- Release
30
- ipch
31
- *.sdf
32
- *.suo
33
- *.user
34
- *.opensdf
35
- _ReSharper*/
36
- packages/
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ /coverage
18
+ /rdoc
19
+ /pkg
20
+
21
+ ## PROJECT::SPECIFIC
22
+ /.idea/*
23
+
24
+ /.yardoc/
25
+ /doc/
26
+
27
+ ## VisualStudio
28
+ Debug
29
+ Release
30
+ ipch
31
+ *.sdf
32
+ *.suo
33
+ *.user
34
+ *.opensdf
35
+ _ReSharper*/
36
+ packages/
37
+ .vs/
data/.yardopts CHANGED
@@ -1,6 +1,8 @@
1
- --readme README.rdoc
1
+ --readme README.md
2
2
  --no-private
3
3
  --hide-void-return
4
4
  --title "RAutomation"
5
- --files History.rdoc,LICENSE
5
+ --files CHANGES.md,LICENSE
6
6
  --default-return ""
7
+ --markup-provider redcarpet
8
+ --markup markdown
data/CHANGES.md ADDED
@@ -0,0 +1,268 @@
1
+ ## 1.1.0 / 2021-12-03
2
+
3
+ * Update ffi dependency to ~> 1.15.0. PR #132
4
+
5
+ ## 1.0.0 / 2019-12-11
6
+
7
+ * Update ffi dependency to ~> 1.11.0.
8
+ * Use Visual Studio 2019 Build Tools for running tests.
9
+
10
+ ## 0.17.0 / 2014-09-29
11
+
12
+ ### Win32 adapter
13
+
14
+ * Fix searching locators by hwnd. See more at issue #96.
15
+
16
+ ## 0.16.0 / 2014-09-29
17
+
18
+ * Loosen up ffi dependency due to fixed segfault problem. See more at issue #81.
19
+
20
+ ## 0.15.0 / 2014-06-01
21
+
22
+ * Fixes #send_keys with special characters. Issue #92.
23
+
24
+ ## 0.14.1 / 2014-02-05
25
+
26
+ * Set ffi 1.9.0 as a dependency for now because newer versions are broken. See more at issue #81.
27
+
28
+ ## 0.14.0 / 2014-02-05
29
+
30
+ ### MsUia adapter
31
+
32
+ * Add SelectList#select and SelectList#clear.
33
+ * Add Table#select and Table#clear.
34
+ * Add Table#selected_rows.
35
+ * Improve performance of table Row lookups.
36
+ * SelectList#options accepts :index and :text (Regexp or String).
37
+ * Window#child in ms_uia works for popup windows as well.
38
+
39
+ ## 0.13.0
40
+
41
+ ### MsUia adapter
42
+
43
+ * Added #select and #clear into SelectList::SelectListOption for multi-select support
44
+ * Removed SelectList#select and SelectList#set
45
+ * Added #select, #selected? and #clear to Table::Row for multi-select support
46
+ * Removed Table#select and Table#selected?
47
+ * Fixed an issue with selecting ListBox items that our outside of the viewable area
48
+
49
+ ## 0.12.0 / 2013-09-05
50
+
51
+ ### MsUia adapter
52
+
53
+ * Add Control#help_text to relay ToolTip information
54
+
55
+ ## 0.11.0 / 2013-08-10
56
+
57
+ ### MsUia adapter
58
+
59
+ * Add support for Window#spinner
60
+
61
+ ## 0.10.0 / 2013-07-26
62
+
63
+ ### MsUia adapter
64
+
65
+ * Fixed an issue with trying to interact with a button after it goes away
66
+ * Add support for Window#tab_control
67
+
68
+ ## 0.9.4 / 2013-07-23
69
+
70
+ * Add license part of gemspec. Closes #70.
71
+
72
+ ## 0.9.3 / 2013-07-23
73
+
74
+ ### MsUia adapter
75
+
76
+ * Added the ability to limit the scope to children only when looking for a control
77
+ * Fixed issues with ListBox controls not firing index change events
78
+
79
+ ## 0.9.2 / 2013-05-19
80
+
81
+ ### Win32 adapter
82
+
83
+ * Window#send_keys supports now :dash, :slash and :backslash. Closes #64.
84
+
85
+ ### MsUia adapter
86
+
87
+ * Ability to get and set the text of a multi-line text control that only supports the TextPattern.
88
+ * Add some caching to speed up locating controls.
89
+ * Fix issue #67 that happens when clicking on controls.
90
+
91
+ ### AutoIt adapter
92
+
93
+ * Add deprecation warning.
94
+
95
+ ## 0.9.1 / 2013-04-26
96
+
97
+ ### MsUia adapter
98
+
99
+ * Ability to interact with controls that do not have native window handles (for example WPF applications).
100
+
101
+ ## 0.9.0 / 2013-04-22
102
+
103
+ ### MsUia adapter
104
+
105
+ * Add support for :name locator.
106
+ * Add support for Window#value_control.
107
+ * Add Table#headers.
108
+ * Add Table#values.
109
+ * Control#exists? uses now uia code.
110
+ * ControlType.Document is also considered as a TextField.
111
+ * Table#select and Table#selected? use 0-based indexing.
112
+ * Table#select supports value too.
113
+
114
+ ### Win32 adapter
115
+
116
+ * Add support for "[", "]" and "'" characters when using Window#send_keys. Fixes #61.
117
+
118
+ ## 0.8.0 / 2012-12-26
119
+
120
+ ### MsUia adapter
121
+
122
+ * Add Control#collapse for collapsing values in collapsable items.
123
+ * Add Control#expand for expanding values in expandable items.
124
+ * Add Row#cell(s).
125
+ * Add Table#cell(s).
126
+ * Add Table#row(s).
127
+ * Add Window#menu for selecting menu items.
128
+ * Fire change events when SelectList selections have been changed.
129
+ * Window#child instantiates MsUia adapter Window.
130
+
131
+ ## 0.7.3 / 2012-10-31
132
+
133
+ ### Win32 adapter
134
+
135
+ * Add support for PasswordField.
136
+
137
+ ### AutoIt adapter
138
+
139
+ * Show error message when registration of AutoIt dll fails.
140
+
141
+ ## 0.7.2 / 2012-03-18
142
+
143
+ ### Win32 adapter
144
+
145
+ * add mouse API with Window#mouse method
146
+ * add Mouse#move, #position, #click, #press and #release methods
147
+
148
+ ### AutoIt adapter
149
+
150
+ * support the same mouse API as Win32 adapter
151
+
152
+ ## 0.7.1 / 2012-02-26
153
+
154
+ ### Win32 adapter
155
+
156
+ * add Window#dimensions to get coordinates of the window
157
+ * add Window#move to move/resize the window
158
+ * fix Window#child not to raise any exceptions for cases where window isn't technically a child
159
+
160
+ ## Version 0.7.0 / 2012-02-23
161
+
162
+ ### All adapters
163
+
164
+ * renamed WinFfi adapter to Win32 adapter
165
+ * added experimental MsUia adapter
166
+ * added support for JRuby
167
+ * Window.windows accepts locators too
168
+ * added Window#class_names for retrieving internal class names of the window and it's controls
169
+ * default locator is :index => 0 when nothing else specified
170
+
171
+ ### Win32 adapter
172
+
173
+ * Window#send_keys has now syntax similar to WatirSpec (https://github.com/watir/watirspec/blob/master/element_spec.rb#L206-249)
174
+ * added TextField#send_keys
175
+
176
+ ### AutoIt adapter
177
+
178
+ * added Window#mouse_move, #mouse_click, #mouse_position, #press_mouse and #release_mouse methods for AutoIt adapter
179
+
180
+ ## Version 0.6.3 / 2011-07-16
181
+
182
+ * use current window's handle (hwnd) in WinFfi::Window#child method
183
+
184
+ ## Version 0.6.2 / 2011-07-07
185
+
186
+ ### WinFFI adapter
187
+
188
+ * loading lazily oleacc.dll
189
+ * loading lazily uia_dll.rb due to problems on certain Windows XP machines
190
+
191
+ ## Version 0.6.1 / 2011-07-05
192
+
193
+ ### WinFFI adapter
194
+
195
+ * Fixed it for Ruby 1.9.2.
196
+
197
+ ## Version 0.6.0 / 2011-07-03
198
+
199
+ ### WinFFI adapter
200
+
201
+ * Window#send_keys now accepts only String argument similar to AutoIt's Send function.
202
+ * added Table#strings, #select, #selected? methods.
203
+ * added Label element support with #value method.
204
+ * added #has_focus? and #set_focus methods to controls.
205
+ * added possibility to search controls by automation id as :id.
206
+ * added #enabled? and #disabled? methods for controls.
207
+ * added Window#control and #controls methods for accessing controls generally.
208
+ * added SelectList#option method.
209
+ * added ListBox element support with #count, #items, #exist?, #selected? and #select methods.
210
+
211
+ ## Version 0.5.1 / 2011-01-30
212
+
213
+ ### All adapters
214
+
215
+ * added Window.windows, #windows, #buttons and #text_fields methods to retrieve collection of elements and use them with Enumerable/Array methods.
216
+
217
+ ### WinFFI adapter
218
+
219
+ * added Window#child method for searching child windows and popups
220
+ * added initial support for Radio, Checkbox, SelectList and Table
221
+
222
+ ### AutoIt adapter
223
+
224
+ * allow to search windows by PID
225
+
226
+ ## Version 0.4.0 / 2010-12-23
227
+
228
+ * allow to search windows without text (like empty Notepad window for example).
229
+ * added possibility to use block for #click to specify successful clicking condition.
230
+ * renamed :ffi adapter to :win_ffi because FFI may be used on other platforms too.
231
+
232
+ ## Version 0.3.0 / 2010-12-18
233
+
234
+ * added Ffi adapter specific method Window#child which searches for child windows and popups
235
+
236
+ ## Version 0.2.1 / 2010-12-17
237
+
238
+ * added yard options for documentation
239
+
240
+ ## Version 0.2.0 / 2010-12-17
241
+
242
+ * added Window#pid method
243
+
244
+ ## Version 0.1.0 / 2010-12-14
245
+
246
+ * added new default adapter for Windows: FFI
247
+ * changes for AutoIt adapter:
248
+ - added 0-based :index locator for window locators to search for windows with the same criteria.
249
+ - renamed text_field and button locator :instance to :index instead.
250
+ - :class_name locator is not allowed anymore. Use :class and :index together instead.
251
+ - use :value for button locator instead of :text
252
+
253
+ ## Version 0.0.4 / 2010-10-27
254
+
255
+ * most Window, Button and TextField methods wait until the object exists. Use RAutomation::Window.wait_timeout= to set timeout before failing. Default is 60 seconds.
256
+
257
+ ## Version 0.0.3 / 2010-10-15
258
+
259
+ * RAutomation didn't load AutoIt correctly if it wasn't installed before
260
+
261
+ ## Version 0.0.2 / 2010-10-14
262
+
263
+ * using :value locator for buttons instead of :text
264
+ * searching only visible windows with some text on them
265
+
266
+ ## Version 0.0.1 / 2010-10-13
267
+
268
+ * Initial release
data/Gemfile.lock CHANGED
@@ -1,30 +1,39 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rautomation (0.15.0)
5
- ffi (= 1.9.0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- diff-lcs (1.2.4)
11
- ffi (1.9.0-x86-mingw32)
12
- rake (0.9.2.2)
13
- rspec (2.14.1)
14
- rspec-core (~> 2.14.0)
15
- rspec-expectations (~> 2.14.0)
16
- rspec-mocks (~> 2.14.0)
17
- rspec-core (2.14.6)
18
- rspec-expectations (2.14.3)
19
- diff-lcs (>= 1.1.3, < 2.0)
20
- rspec-mocks (2.14.4)
21
- yard (0.8.6.1)
22
-
23
- PLATFORMS
24
- x86-mingw32
25
-
26
- DEPENDENCIES
27
- rake
28
- rautomation!
29
- rspec (~> 2.14)
30
- yard
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rautomation (1.1.0)
5
+ ffi (~> 1.15.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ diff-lcs (1.2.4)
11
+ ffi (1.15.4)
12
+ ffi (1.15.4-x86-mingw32)
13
+ github-markup (3.0.4)
14
+ rake (0.9.2.2)
15
+ redcarpet (3.5.0)
16
+ rspec (2.14.1)
17
+ rspec-core (~> 2.14.0)
18
+ rspec-expectations (~> 2.14.0)
19
+ rspec-mocks (~> 2.14.0)
20
+ rspec-core (2.14.6)
21
+ rspec-expectations (2.14.3)
22
+ diff-lcs (>= 1.1.3, < 2.0)
23
+ rspec-mocks (2.14.4)
24
+ yard (0.9.20)
25
+
26
+ PLATFORMS
27
+ ruby
28
+ x86-mingw32
29
+
30
+ DEPENDENCIES
31
+ github-markup
32
+ rake
33
+ rautomation!
34
+ redcarpet
35
+ rspec (~> 2.14)
36
+ yard
37
+
38
+ BUNDLED WITH
39
+ 2.0.1
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2013 Jarmo Pertman
1
+ Copyright (c) Jarmo Pertman
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md ADDED
@@ -0,0 +1,141 @@
1
+ # RAutomation
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/rautomation.png)](http://badge.fury.io/rb/rautomation)
4
+
5
+ * Web: http://www.github.com/jarmo/RAutomation
6
+ * Author: Jarmo Pertman [jarmo@jarmopertman.com](mailto:jarmo@jarmopertman.com)
7
+
8
+
9
+ RAutomation is a small and easy to use library for helping out to automate
10
+ windows and their controls for automated testing.
11
+
12
+ RAutomation provides:
13
+ * Easy to use and user-friendly API (inspired by [Watir](http://www.watir.com))
14
+ * Cross-platform compatibility
15
+ * Easy extensibility - with small scripting effort it's possible to add
16
+ support for not yet supported platforms or technologies
17
+
18
+
19
+ ## USAGE
20
+
21
+ require "rautomation"
22
+
23
+ window = RAutomation::Window.new(:title => /part of the title/i)
24
+ window.exists? # => true
25
+
26
+ window.title # => "blah blah part Of the title blah"
27
+ window.text # => "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ultricies..."
28
+
29
+ window.text_field(:class => "Edit", :index => 0).set "hello, world!"
30
+ button = window.button(:value => "&Save")
31
+ button.exists? # => true
32
+ button.click
33
+
34
+ all_windows = RAutomation::Window.windows
35
+ all_windows.each {|window| puts window.hwnd}
36
+
37
+ window = RAutomation::Window.new(:title => /part of the title/i)
38
+ windows = window.windows
39
+ puts windows.size # => 2
40
+ windows.map &:title # => ["part of the title 1", "part of the title 2"]
41
+
42
+ window.windows(:title => /part of other title/i) # => all windows with matching specified title
43
+
44
+ window.buttons.each {|button| puts button.value}
45
+ window.buttons(:value => /some value/i).each {|button| puts button.value}
46
+
47
+ window2 = RAutomation::Window.new(:title => "Other Title", :adapter => :autoit) # use AutoIt adapter
48
+ # use adapter's (in this case AutoIt's) internal methods not part of the public API directly
49
+ window2.WinClose("[TITLE:Other Title]")
50
+
51
+ Check out [the documentation](https://rubydoc.info/github/jarmo/RAutomation) for other possible usages!
52
+
53
+ ## INSTALL
54
+
55
+ ### Windows
56
+
57
+ gem install rautomation
58
+
59
+ Available adapters:
60
+ * :win_32 - uses Windows API directly with FFI (default)
61
+ * :ms_uia - an experimental adapter
62
+ * :autoit - uses AutoIt for automation (DEPRECATED)
63
+
64
+
65
+ When using AutoIt adapter: You might need administrative privileges if running
66
+ for the first time and you haven't installed AutoIt before!
67
+
68
+ ### Linux
69
+
70
+ Feel yourself at home on Linux and know how to automate windows and their
71
+ controls? I would be happy if you'd contact me about that matter - or even
72
+ better, follow the instructions at "How to create a new adapter?"
73
+
74
+ ### OS X
75
+
76
+ Feel yourself at home on OS X and know how to automate windows and their
77
+ controls? I would be happy if you'd contact me about that matter - or even
78
+ better, follow the instructions at "How to create a new adapter?"
79
+
80
+ ### Others
81
+
82
+ Feel yourself at home on some operating system not listed in here and know how
83
+ to automate windows and their controls? Does Ruby also work on that operating
84
+ system? I would be happy if you'd contact me about that matter - or even
85
+ better, follow the instructions at "How to create a new adapter?"
86
+
87
+ ## Supported Ruby Platforms
88
+
89
+ Currently only 32bit Ruby is supported. 64bit versions **do not work** at all!
90
+
91
+ ## How to create a new adapter?
92
+
93
+ 1. Fork the project.
94
+ 2. Create entry point file to lib/rautomation/adapter which should load all
95
+ adapter specific files.
96
+ 3. Add `autoload` statement into lib/rautomation/adapter/helper.rb for that
97
+ file.
98
+ 4. Create a directory for your adapter's specific code into
99
+ lib/rautomation/adapter
100
+ 5. Copy button.rb, text_field.rb and window.rb from some of the existing
101
+ adapter's directory.
102
+ 6. Add spec data for your adapter into spec/spec_helper DATA constant.
103
+ 7. Use environment variable *RAUTOMATION_ADAPTER* to point to that adapter.
104
+ 8. Start coding and spec-ing until as much of possible of the public API is
105
+ satisfied.
106
+ 9. Make me a pull request.
107
+
108
+
109
+ Don't forget to fix the documentation for that adapter also!
110
+
111
+ In case of any problems, feel free to contact me.
112
+
113
+ ## Contributors
114
+
115
+ * Levi Wilson - https://github.com/leviwilson
116
+ * Eric Kessler - https://github.com/enkessler
117
+ * Stephan Schwab - https://github.com/snscaimito
118
+
119
+
120
+ ## Libraries Using RAutomation
121
+
122
+ * [watir-classic](https://github.com/watir/watir-classic)
123
+ * [mohawk](https://github.com/leviwilson/mohawk)
124
+
125
+
126
+ ## Note on Patches/Pull Requests
127
+
128
+ * Fork the project.
129
+ * Make your feature addition or bug fix.
130
+ * Add tests for it. This is important so I don't break it in a future
131
+ version unintentionally.
132
+ * Commit, do not mess with rakefile, version, or history.
133
+
134
+ (if you want to have your own version, that is fine but bump version in a
135
+ commit by itself I can ignore when I pull)
136
+ * Send me a pull request. Bonus points for topic branches.
137
+
138
+
139
+ ## Copyright
140
+
141
+ Copyright (c) Jarmo Pertman. See LICENSE for details.
data/Rakefile CHANGED
@@ -65,6 +65,6 @@ YARD::Rake::YardocTask.new
65
65
 
66
66
  task :default => "spec:all"
67
67
 
68
- task :release => "spec:all"
68
+ task "release:source_control_push" => :spec
69
69
 
70
70
  task :install => :build
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.15.0
1
+ 1.1.0