rwebspec 1.4.0.1 → 1.4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +306 -300
- data/MIT-LICENSE +21 -21
- data/README +32 -32
- data/Rakefile +104 -94
- data/lib/rspec_extensions.rb +50 -50
- data/lib/rwebspec/assert.rb +361 -361
- data/lib/rwebspec/clickJSDialog.rb +15 -15
- data/lib/rwebspec/context.rb +24 -24
- data/lib/rwebspec/driver.rb +7 -0
- data/lib/rwebspec/itest_plugin.rb +20 -9
- data/lib/rwebspec/matchers/contains_text.rb +37 -37
- data/lib/rwebspec/popup.rb +147 -147
- data/lib/rwebspec/rspec_helper.rb +96 -96
- data/lib/rwebspec/test_script.rb +8 -8
- data/lib/rwebspec/test_utils.rb +171 -171
- data/lib/rwebspec/using_pages.rb +49 -49
- data/lib/rwebspec/web_browser.rb +566 -528
- data/lib/rwebspec/web_page.rb +104 -94
- data/lib/rwebspec/web_testcase.rb +38 -36
- data/lib/rwebspec.rb +31 -31
- data/lib/rwebunit.rb +3 -3
- data/lib/watir_extensions.rb +69 -69
- metadata +16 -6
data/CHANGELOG
CHANGED
@@ -1,300 +1,306 @@
|
|
1
|
-
CHANGELOG
|
2
|
-
=========
|
3
|
-
1.4.0
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
-
|
47
|
-
-
|
48
|
-
|
49
|
-
|
50
|
-
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
1.1.
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
-
|
131
|
-
- add
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
== 0.8.
|
168
|
-
- support
|
169
|
-
|
170
|
-
== 0.8.
|
171
|
-
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
-
|
188
|
-
|
189
|
-
== 0.8
|
190
|
-
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
-
|
197
|
-
|
198
|
-
|
199
|
-
-
|
200
|
-
|
201
|
-
|
202
|
-
-
|
203
|
-
|
204
|
-
== 0.
|
205
|
-
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
-
|
212
|
-
|
213
|
-
|
214
|
-
-
|
215
|
-
|
216
|
-
|
217
|
-
-
|
218
|
-
|
219
|
-
== 0.
|
220
|
-
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
-
|
228
|
-
|
229
|
-
-
|
230
|
-
-
|
231
|
-
|
232
|
-
-
|
233
|
-
-
|
234
|
-
-
|
235
|
-
-
|
236
|
-
-
|
237
|
-
|
238
|
-
|
239
|
-
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
== 0.
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
== 0.
|
267
|
-
|
268
|
-
New features
|
269
|
-
-
|
270
|
-
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
1
|
+
CHANGELOG
|
2
|
+
=========
|
3
|
+
1.4.0.2
|
4
|
+
Fixed: reuse browser does not work
|
5
|
+
Add gem dependency (Watir/Firewatir) depends on platforms
|
6
|
+
Patch Unicode by default
|
7
|
+
More rdoc update
|
8
|
+
|
9
|
+
1.4.0
|
10
|
+
Renamed to rwebspec
|
11
|
+
1.9 compliance
|
12
|
+
TODO: support JRuby to run against Firefox and Celerity
|
13
|
+
|
14
|
+
1.3.1
|
15
|
+
[Enhancement] better absolutize the hyperlinks in dumped page source
|
16
|
+
[Fixes] logic in allowing method
|
17
|
+
|
18
|
+
1.3
|
19
|
+
add new syntax for including pages
|
20
|
+
extend RWebSpec::UsingPages
|
21
|
+
pages :login_page, :receipt_page, :page_dir => 'c:/temp'
|
22
|
+
|
23
|
+
1.2.4
|
24
|
+
Generate new rdoc
|
25
|
+
|
26
|
+
1.2.3
|
27
|
+
New - support_unicode
|
28
|
+
More alias assert_select_label_not_present assert_option_not_present
|
29
|
+
New - click_button_with_name
|
30
|
+
|
31
|
+
1.2.2
|
32
|
+
|
33
|
+
save_current_page save to ITEST2
|
34
|
+
|
35
|
+
1.2.1 (2009-04-02)
|
36
|
+
|
37
|
+
Fixes - base_url is file://
|
38
|
+
New - set_hidden_field
|
39
|
+
New - allowing
|
40
|
+
New - try { } handles boolean values as well
|
41
|
+
Doc update
|
42
|
+
|
43
|
+
1.2
|
44
|
+
REVISIT all APIs
|
45
|
+
- assertions
|
46
|
+
- assert_not (new)
|
47
|
+
- assert_text_field_value (new)
|
48
|
+
- assert_text_present_in_table (renamed)
|
49
|
+
- assert_element_present (removed, use assert div(:id, "").exists?)
|
50
|
+
- driver.rb
|
51
|
+
- wait_until (new)
|
52
|
+
- repeat_try_util (new)
|
53
|
+
- try (add more clear messages when block failed)
|
54
|
+
- add unit tests
|
55
|
+
- run unit test against the test page in Firefox Browser
|
56
|
+
- major documentation update
|
57
|
+
|
58
|
+
1.1.3
|
59
|
+
add open_existing_browser
|
60
|
+
|
61
|
+
1.1.2 (2009-03-13)
|
62
|
+
added goto_url
|
63
|
+
|
64
|
+
1.1.1
|
65
|
+
add open_browser.rb, check for firefox with jssh is running
|
66
|
+
added assert_exists, assert_not_exists
|
67
|
+
|
68
|
+
1.1
|
69
|
+
|
70
|
+
Changed dependency (Assertions) for test-unit 2.0.2, ruby 1.9.1 ready
|
71
|
+
Extract popup.rb out
|
72
|
+
Added repeat_try in driver.rb
|
73
|
+
remove should_not_allow, should_allow. Important!!! don't define methods start with should_not_, should_
|
74
|
+
|
75
|
+
1.0.4
|
76
|
+
Added: WebBrowser.html WebBrowser.text
|
77
|
+
Added: random method in test_utils
|
78
|
+
Enhancemet: close_browser works even no browser started in the test
|
79
|
+
move open_browser to driver.rb
|
80
|
+
fixed include rwebspec causing stack too deep error
|
81
|
+
|
82
|
+
1.0.3
|
83
|
+
- New set of samples (real life tests)
|
84
|
+
|
85
|
+
1.0.2
|
86
|
+
- add more unit tests
|
87
|
+
Fixes cell_with_id
|
88
|
+
|
89
|
+
1.0.1
|
90
|
+
[Enhancement] Normalize windows file path before setting upload
|
91
|
+
|
92
|
+
1.0 (2008-11-25)
|
93
|
+
|
94
|
+
TODO:
|
95
|
+
Firefox: check the element is hidden or showing,
|
96
|
+
Checkfor driver.rb: ajax_call_complete_after_element_hidden
|
97
|
+
does not support outerHtml yet
|
98
|
+
Firefox: attach browser,
|
99
|
+
Unfortundately, Firewatir does not support attaching current window
|
100
|
+
Firefox Workaround: element_by_id
|
101
|
+
|
102
|
+
0.10.3
|
103
|
+
- added label_with_id, span_with_id, cell_with_id
|
104
|
+
- better fixes for enabled_popup
|
105
|
+
|
106
|
+
0.10.1 (2008-11-08)
|
107
|
+
- Upgrade to support Firewatir 1.6.2
|
108
|
+
- Work around Firefox reuse one window browser issue
|
109
|
+
- Exclude watir/contrib/enabled_popup, user can add themselves
|
110
|
+
|
111
|
+
0.9.10 (2008-10-28)
|
112
|
+
[Feature] Better support reuse IE window for testing
|
113
|
+
|
114
|
+
0.9.9.1
|
115
|
+
[Feature] Support pausing in iTest2
|
116
|
+
|
117
|
+
== 0.9.9
|
118
|
+
[Fixes] add "area" method for running tests against Firefox
|
119
|
+
[Enhancement] Pass browser type and base_utl when calling attach_browser
|
120
|
+
|
121
|
+
== 0.9.8
|
122
|
+
[New] 'assert_title' to check page title
|
123
|
+
[Fixes] Not same two same messages to iTest in a row
|
124
|
+
|
125
|
+
== 0.9.7
|
126
|
+
[TODO] support should.contains?(JAMEs)
|
127
|
+
[WORKING] maybe yield to suport
|
128
|
+
- add prepare_to_click_button_in_popup() in driver.rb
|
129
|
+
- refactor web_tester.rb to use dynamicly create test cases
|
130
|
+
- rename web_tester.rb to web_browser.rb
|
131
|
+
- add alias visit (goto_page)
|
132
|
+
- WebBrowser.attach_browser return rWebUnit WebBrowser instance instead of Watir or Firefox
|
133
|
+
- expect_page(Class, argument) added to support one more additional argument
|
134
|
+
|
135
|
+
== 0.9.6
|
136
|
+
- using global variable instead of environment variable passing between rwebspec and iTest
|
137
|
+
- add debug()
|
138
|
+
|
139
|
+
== 0.9.5
|
140
|
+
- Add support for iTest to trace execution
|
141
|
+
|
142
|
+
== 0.9.4 (2008-08-20)
|
143
|
+
- change test_context => context, avoid confusing Ruby test
|
144
|
+
- refactored driver.rb
|
145
|
+
|
146
|
+
== 0.9.3
|
147
|
+
- add method failsafe {}
|
148
|
+
|
149
|
+
== 0.9.2
|
150
|
+
- sleep 0.5 seconds after clicking popup window
|
151
|
+
- save current page
|
152
|
+
- (0.9.1.1) support rspec 1.1.4: at exit hook
|
153
|
+
|
154
|
+
== 0.9.1 (2008-05-26)
|
155
|
+
- support storing page source during execution
|
156
|
+
|
157
|
+
== 0.9 (2008-05-21)
|
158
|
+
- support new syntax
|
159
|
+
spec "" do
|
160
|
+
scenario "1" do
|
161
|
+
end
|
162
|
+
|
163
|
+
story "2" do
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
== 0.8.9
|
168
|
+
- support Watir 1.5.4 zippy mode, set it as default
|
169
|
+
|
170
|
+
== 0.8.8
|
171
|
+
- support iTest hiding browse option
|
172
|
+
|
173
|
+
== 0.8.7
|
174
|
+
- support delay between operations (must be click_... type operation) for iTest2
|
175
|
+
|
176
|
+
== 0.8.6
|
177
|
+
- Add dependency on activesupport 2.0.x, xml_simple to support 1.days.ago
|
178
|
+
- RSpec Helper, overwrite rspec patch
|
179
|
+
|
180
|
+
== 0.8.5
|
181
|
+
- click button with image
|
182
|
+
- better handling new pop up window
|
183
|
+
- fixes links_with_text
|
184
|
+
|
185
|
+
== 0.8.4
|
186
|
+
- better support for iTest
|
187
|
+
- for firefox support, don't do slow typing, just set text in textfield
|
188
|
+
|
189
|
+
== 0.8.2
|
190
|
+
- fixed assert_link_not_present has .Text
|
191
|
+
|
192
|
+
== 0.8.1
|
193
|
+
- fixed attach_browser issue
|
194
|
+
|
195
|
+
== 0.8 (2008-01-18)
|
196
|
+
- change click_link to click_link_with_text, to for id click, use click_link_with_id
|
197
|
+
- change click_button to click_button_with_text, to for id click, use click_button_with_id
|
198
|
+
|
199
|
+
== 0.7.2 (2007-12-31)
|
200
|
+
- Change dependency from Watir => Watir or FireWatir
|
201
|
+
Now can run on Mac or Linux
|
202
|
+
- Fixes: shall_not_allow syntax error
|
203
|
+
|
204
|
+
== 0.7.1 (2007-12-24)
|
205
|
+
- Fixes error when firefox is not available
|
206
|
+
|
207
|
+
== 0.7 (2007-12-18)
|
208
|
+
- support Firefox using FireWatir
|
209
|
+
|
210
|
+
== 0.6.9
|
211
|
+
- add shall_not_allow
|
212
|
+
- more watir wrapper methods
|
213
|
+
|
214
|
+
== 0.6.4 (2007-11-30)
|
215
|
+
- updated rwebspec 0.6.4
|
216
|
+
- support javascript window
|
217
|
+
- support watir td, tr...
|
218
|
+
|
219
|
+
== 0.6.0 (2007-11-18)
|
220
|
+
- support watir convenient methods
|
221
|
+
|
222
|
+
== 0.5.4 (2007-11-12)
|
223
|
+
- fixed element_by_id
|
224
|
+
|
225
|
+
== 0.5.3 (2007-11-07)
|
226
|
+
- fixed ajax_wait_element with web_tester changes
|
227
|
+
- added wait_for_element
|
228
|
+
|
229
|
+
== 0.5.2 (2007-09-27)
|
230
|
+
- added element_text
|
231
|
+
|
232
|
+
== 0.5.1 (2007-09-21)
|
233
|
+
- add wrap of Watir methods, such as buttons, button(...)
|
234
|
+
- expose Watir low level methods to test/spec through Driver.rb
|
235
|
+
- removed old way using array and comparision to access individual control
|
236
|
+
- renamed html_title to page_title
|
237
|
+
- add method contains_text
|
238
|
+
- make faster checkbox operations
|
239
|
+
- make faster radio operations
|
240
|
+
- added radio operation in driver.rb
|
241
|
+
- renamed ajax_wait_for_element
|
242
|
+
- added some comments
|
243
|
+
|
244
|
+
== 0.5.0
|
245
|
+
- Support Watir 1.5.2
|
246
|
+
|
247
|
+
== 0.4.5
|
248
|
+
- support checkboxes with same name
|
249
|
+
|
250
|
+
== 0.4.2
|
251
|
+
|
252
|
+
New Features
|
253
|
+
- Drop support for java syntax methods
|
254
|
+
- remove assert helper methods in web_tester
|
255
|
+
- improve support for RSpecs
|
256
|
+
|
257
|
+
== 0.4.0 (2007-05-29)
|
258
|
+
|
259
|
+
New features
|
260
|
+
- Support RSpec
|
261
|
+
|
262
|
+
== 0.3.1 (2007-04-18)
|
263
|
+
|
264
|
+
Bug fix reelase
|
265
|
+
|
266
|
+
== 0.3.0 (2007-02-16)
|
267
|
+
|
268
|
+
New features
|
269
|
+
- Deprecated Java like method name, use ruby naming convention instead, beginAt => begin_at
|
270
|
+
- More ajax related calls: ajax_wait_for_element_show, ajax_wait_for_element_hide, assert_position_in_list
|
271
|
+
|
272
|
+
== 0.2.0 (2006-11-28)
|
273
|
+
|
274
|
+
New features:
|
275
|
+
- wait_ajax_udpate(elem_id, seconds) - use indicator image id to determine whether the ajax request is completed or not
|
276
|
+
- browser_opened?
|
277
|
+
|
278
|
+
A number of general fixes and code improvements.
|
279
|
+
|
280
|
+
== 0.1.1
|
281
|
+
|
282
|
+
New jWebUnit API methods implemented:
|
283
|
+
assertOptionEquals(selectName, optionLabel)
|
284
|
+
assertOptionValueEquals(selectName, optionValue)
|
285
|
+
assertCheckboxNotSelected(checkBoxName)
|
286
|
+
assertCheckboxSelected(checkBoxName)
|
287
|
+
assertLinkPresentWithExactText(linkText)
|
288
|
+
assertLinkNotPresentWithExactText(linkText)
|
289
|
+
assertRadioOptionNotPresent(radioGroup, radioOption)
|
290
|
+
assertRadioOptionPresent(radioGroup, radioOption)
|
291
|
+
assertRadioOptionSelected(radioGroup, radioOption)
|
292
|
+
assertRadioOptionNotSelected(radioGroup, radioOption)
|
293
|
+
assertTextInTable(tableId, text)
|
294
|
+
assertTextNotInTable(tableId, text)
|
295
|
+
|
296
|
+
API methods modified:
|
297
|
+
assertLinkPresentWithText(linkText):
|
298
|
+
assertLinkNotPresentWithText(linkText):
|
299
|
+
|
300
|
+
New rWebUnit API :
|
301
|
+
clickRadioOption(radioGroup, radioOption): this method is protected in jWebUnit
|
302
|
+
|
303
|
+
== 0.1.0
|
304
|
+
|
305
|
+
* Initial release.
|
306
|
+
* Most common web actions and assertions implemented.
|
data/MIT-LICENSE
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
Copyright (c) 2006-2008 Zhimin Zhan, zhimin@zhimin.com
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
-
|
1
|
+
Copyright (c) 2006-2008 Zhimin Zhan, zhimin@zhimin.com
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|