rwebunit 0.9.4 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +228 -168
- data/MIT-LICENSE +1 -1
- data/README +32 -29
- data/Rakefile +5 -4
- data/lib/rspec_extensions.rb +10 -2
- data/lib/rwebunit.rb +8 -3
- data/lib/rwebunit/assert.rb +25 -24
- data/lib/rwebunit/clickJSDialog.rb +15 -0
- data/lib/rwebunit/context.rb +24 -24
- data/lib/rwebunit/driver.rb +297 -33
- data/lib/rwebunit/itest_plugin.rb +47 -0
- data/lib/rwebunit/matchers/contains_text.rb +37 -0
- data/lib/rwebunit/rspec_helper.rb +140 -128
- data/lib/rwebunit/test_utils.rb +98 -88
- data/lib/rwebunit/{web_tester.rb → web_browser.rb} +433 -510
- data/lib/rwebunit/web_page.rb +96 -99
- data/lib/rwebunit/web_testcase.rb +36 -36
- data/lib/watir_extensions.rb +65 -0
- data/test/mock_page.rb +8 -0
- data/test/setup.rb +10 -0
- data/test/test.html +129 -0
- data/test/test_assert.rb +64 -0
- data/test/test_driver.rb +23 -5
- metadata +24 -14
- data/sample/README.txt +0 -21
- data/sample/kangxi_home_webtest.rb +0 -37
- data/sample/kangxi_httpcaller_webtest.rb +0 -33
- data/sample/kangxi_pages.rb +0 -62
- data/sample/kangxi_xml_formatter_webtest.rb +0 -44
- data/sample/rwebunit_home_testcase.rb +0 -22
- data/sample/sample_rwebunit_test.rb +0 -15
- data/sample/sample_rwebunit_testcase.rb +0 -22
- data/sample/sample_watir_test.rb +0 -17
data/CHANGELOG
CHANGED
@@ -1,168 +1,228 @@
|
|
1
|
-
CHANGELOG
|
2
|
-
=========
|
3
|
-
|
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
|
-
== 0.
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
-
|
53
|
-
|
54
|
-
|
55
|
-
-
|
56
|
-
|
57
|
-
== 0.
|
58
|
-
-
|
59
|
-
-
|
60
|
-
|
61
|
-
== 0.
|
62
|
-
-
|
63
|
-
|
64
|
-
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
-
|
74
|
-
-
|
75
|
-
|
76
|
-
== 0.
|
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
|
-
|
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
|
-
|
168
|
-
|
1
|
+
CHANGELOG
|
2
|
+
=========
|
3
|
+
1.0.3
|
4
|
+
-- add method: dubugging?
|
5
|
+
-- add utils method: this_dir, this_file
|
6
|
+
|
7
|
+
1.0.2
|
8
|
+
- add more unit tests
|
9
|
+
Fixes cell_with_id
|
10
|
+
|
11
|
+
1.0.1
|
12
|
+
[Enhancement] Normalize windows file path before setting upload
|
13
|
+
|
14
|
+
1.0 (2008-11-25)
|
15
|
+
|
16
|
+
TODO:
|
17
|
+
Firefox: check the element is hidden or showing,
|
18
|
+
Checkfor driver.rb: ajax_call_complete_after_element_hidden
|
19
|
+
does not support outerHtml yet
|
20
|
+
Firefox: attach browser,
|
21
|
+
Unfortundately, Firewatir does not support attaching current window
|
22
|
+
Firefox Workaround: element_by_id
|
23
|
+
|
24
|
+
0.10.3
|
25
|
+
- added label_with_id, span_with_id, cell_with_id
|
26
|
+
- better fixes for enabled_popup
|
27
|
+
|
28
|
+
0.10.1 (2008-11-08)
|
29
|
+
- Upgrade to support Firewatir 1.6.2
|
30
|
+
- Work around Firefox reuse one window browser issue
|
31
|
+
- Exclude watir/contrib/enabled_popup, user can add themselves
|
32
|
+
|
33
|
+
0.9.10 (2008-10-28)
|
34
|
+
[Feature] Better support reuse IE window for testing
|
35
|
+
|
36
|
+
0.9.9.1
|
37
|
+
[Feature] Support pausing in iTest2
|
38
|
+
|
39
|
+
== 0.9.9
|
40
|
+
[Fixes] add "area" method for running tests against Firefox
|
41
|
+
[Enhancement] Pass browser type and base_utl when calling attach_browser
|
42
|
+
|
43
|
+
== 0.9.8
|
44
|
+
[New] 'assert_title' to check page title
|
45
|
+
[Fixes] Not same two same messages to iTest in a row
|
46
|
+
|
47
|
+
== 0.9.7
|
48
|
+
[TODO] support should.contains?(JAMEs)
|
49
|
+
[WORKING] maybe yield to suport
|
50
|
+
- add prepare_to_click_button_in_popup() in driver.rb
|
51
|
+
- refactor web_tester.rb to use dynamicly create test cases
|
52
|
+
- rename web_tester.rb to web_browser.rb
|
53
|
+
- add alias visit (goto_page)
|
54
|
+
- WebBrowser.attach_browser return rWebUnit WebBrowser instance instead of Watir or Firefox
|
55
|
+
- expect_page(Class, argument) added to support one more additional argument
|
56
|
+
|
57
|
+
== 0.9.6
|
58
|
+
- using global variable instead of environment variable passing between rwebunit and iTest
|
59
|
+
- add debug()
|
60
|
+
|
61
|
+
== 0.9.5
|
62
|
+
- Add support for iTest to trace execution
|
63
|
+
|
64
|
+
== 0.9.4 (2008-08-20)
|
65
|
+
- change test_context => context, avoid confusing Ruby test
|
66
|
+
- refactored driver.rb
|
67
|
+
|
68
|
+
== 0.9.3
|
69
|
+
- add method failsafe {}
|
70
|
+
|
71
|
+
== 0.9.2
|
72
|
+
- sleep 0.5 seconds after clicking popup window
|
73
|
+
- save current page
|
74
|
+
- (0.9.1.1) support rspec 1.1.4: at exit hook
|
75
|
+
|
76
|
+
== 0.9.1 (2008-05-26)
|
77
|
+
- support storing page source during execution
|
78
|
+
|
79
|
+
== 0.9 (2008-05-21)
|
80
|
+
- support new syntax
|
81
|
+
spec "" do
|
82
|
+
scenario "1" do
|
83
|
+
end
|
84
|
+
|
85
|
+
story "2" do
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
== 0.8.9
|
90
|
+
- support Watir 1.5.4 zippy mode, set it as default
|
91
|
+
|
92
|
+
== 0.8.8
|
93
|
+
- support iTest hiding browse option
|
94
|
+
|
95
|
+
== 0.8.7
|
96
|
+
- support delay between operations (must be click_... type operation) for iTest2
|
97
|
+
|
98
|
+
== 0.8.6
|
99
|
+
- Add dependency on activesupport 2.0.x, xml_simple to support 1.days.ago
|
100
|
+
- RSpec Helper, overwrite rspec patch
|
101
|
+
|
102
|
+
== 0.8.5
|
103
|
+
- click button with image
|
104
|
+
- better handling new pop up window
|
105
|
+
- fixes links_with_text
|
106
|
+
|
107
|
+
== 0.8.4
|
108
|
+
- better support for iTest
|
109
|
+
- for firefox support, don't do slow typing, just set text in textfield
|
110
|
+
|
111
|
+
== 0.8.2
|
112
|
+
- fixed assert_link_not_present has .Text
|
113
|
+
|
114
|
+
== 0.8.1
|
115
|
+
- fixed attach_browser issue
|
116
|
+
|
117
|
+
== 0.8 (2008-01-18)
|
118
|
+
- change click_link to click_link_with_text, to for id click, use click_link_with_id
|
119
|
+
- change click_button to click_button_with_text, to for id click, use click_button_with_id
|
120
|
+
|
121
|
+
== 0.7.2 (2007-12-31)
|
122
|
+
- Change dependency from Watir => Watir or FireWatir
|
123
|
+
Now can run on Mac or Linux
|
124
|
+
- Fixes: shall_not_allow syntax error
|
125
|
+
|
126
|
+
== 0.7.1 (2007-12-24)
|
127
|
+
- Fixes error when firefox is not available
|
128
|
+
|
129
|
+
== 0.7 (2007-12-18)
|
130
|
+
- support Firefox using FireWatir
|
131
|
+
|
132
|
+
== 0.6.9
|
133
|
+
- add shall_not_allow
|
134
|
+
- more watir wrapper methods
|
135
|
+
|
136
|
+
== 0.6.4 (2007-11-30)
|
137
|
+
- updated rwebunit 0.6.4
|
138
|
+
- support javascript window
|
139
|
+
- support watir td, tr...
|
140
|
+
|
141
|
+
== 0.6.0 (2007-11-18)
|
142
|
+
- support watir convenient methods
|
143
|
+
|
144
|
+
== 0.5.4 (2007-11-12)
|
145
|
+
- fixed element_by_id
|
146
|
+
|
147
|
+
== 0.5.3 (2007-11-07)
|
148
|
+
- fixed ajax_wait_element with web_tester changes
|
149
|
+
- added wait_for_element
|
150
|
+
|
151
|
+
== 0.5.2 (2007-09-27)
|
152
|
+
- added element_text
|
153
|
+
|
154
|
+
== 0.5.1 (2007-09-21)
|
155
|
+
- add wrap of Watir methods, such as buttons, button(...)
|
156
|
+
- expose Watir low level methods to test/spec through Driver.rb
|
157
|
+
- removed old way using array and comparision to access individual control
|
158
|
+
- renamed html_title to page_title
|
159
|
+
- add method contains_text
|
160
|
+
- make faster checkbox operations
|
161
|
+
- make faster radio operations
|
162
|
+
- added radio operation in driver.rb
|
163
|
+
- renamed ajax_wait_for_element
|
164
|
+
- added some comments
|
165
|
+
|
166
|
+
== 0.5.0
|
167
|
+
- Support Watir 1.5.2
|
168
|
+
|
169
|
+
== 0.4.5
|
170
|
+
- support checkboxes with same name
|
171
|
+
|
172
|
+
== 0.4.2
|
173
|
+
|
174
|
+
New Features
|
175
|
+
- Drop support for java syntax methods
|
176
|
+
- remove assert helper methods in web_tester
|
177
|
+
- improve support for RSpecs
|
178
|
+
|
179
|
+
== 0.4.0 (2007-05-29)
|
180
|
+
|
181
|
+
New features
|
182
|
+
- Support RSpec
|
183
|
+
|
184
|
+
== 0.3.1 (2007-04-18)
|
185
|
+
|
186
|
+
Bug fix reelase
|
187
|
+
|
188
|
+
== 0.3.0 (2007-02-16)
|
189
|
+
|
190
|
+
New features
|
191
|
+
- Deprecated Java like method name, use ruby naming convention instead, beginAt => begin_at
|
192
|
+
- More ajax related calls: ajax_wait_for_element_show, ajax_wait_for_element_hide, assert_position_in_list
|
193
|
+
|
194
|
+
== 0.2.0 (2006-11-28)
|
195
|
+
|
196
|
+
New features:
|
197
|
+
- wait_ajax_udpate(elem_id, seconds) - use indicator image id to determine whether the ajax request is completed or not
|
198
|
+
- browser_opened?
|
199
|
+
|
200
|
+
A number of general fixes and code improvements.
|
201
|
+
|
202
|
+
== 0.1.1
|
203
|
+
|
204
|
+
New jWebUnit API methods implemented:
|
205
|
+
assertOptionEquals(selectName, optionLabel)
|
206
|
+
assertOptionValueEquals(selectName, optionValue)
|
207
|
+
assertCheckboxNotSelected(checkBoxName)
|
208
|
+
assertCheckboxSelected(checkBoxName)
|
209
|
+
assertLinkPresentWithExactText(linkText)
|
210
|
+
assertLinkNotPresentWithExactText(linkText)
|
211
|
+
assertRadioOptionNotPresent(radioGroup, radioOption)
|
212
|
+
assertRadioOptionPresent(radioGroup, radioOption)
|
213
|
+
assertRadioOptionSelected(radioGroup, radioOption)
|
214
|
+
assertRadioOptionNotSelected(radioGroup, radioOption)
|
215
|
+
assertTextInTable(tableId, text)
|
216
|
+
assertTextNotInTable(tableId, text)
|
217
|
+
|
218
|
+
API methods modified:
|
219
|
+
assertLinkPresentWithText(linkText):
|
220
|
+
assertLinkNotPresentWithText(linkText):
|
221
|
+
|
222
|
+
New rWebUnit API :
|
223
|
+
clickRadioOption(radioGroup, radioOption): this method is protected in jWebUnit
|
224
|
+
|
225
|
+
== 0.1.0
|
226
|
+
|
227
|
+
* Initial release.
|
228
|
+
* Most common web actions and assertions implemented.
|
data/MIT-LICENSE
CHANGED
data/README
CHANGED
@@ -1,30 +1,33 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
rWebUnit
|
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
|
-
|
1
|
+
|
2
|
+
rWebUnit wraps the popular web testing framework WATIR with RSpec Syntax to provide better easy to read automated web test cases. By using iTest/Watir recorder, the rWebUnit test scripts can be recorded in Firefox. iTest2 makes editing/executing test cases with ease.
|
3
|
+
|
4
|
+
Sample rWebUnit Test:
|
5
|
+
|
6
|
+
require 'rwebunit'
|
7
|
+
|
8
|
+
spec "Locate a Suncorp Branch" do
|
9
|
+
include RWebUnit::RSpecHelper
|
10
|
+
|
11
|
+
before(:all) do
|
12
|
+
open_browser_with("http://suncorp.com.au/")
|
13
|
+
end
|
14
|
+
|
15
|
+
before(:each) do
|
16
|
+
goto_page("/locator")
|
17
|
+
end
|
18
|
+
|
19
|
+
after(:all) do
|
20
|
+
close_browser
|
21
|
+
end
|
22
|
+
|
23
|
+
scenario "Find by extended trading hours" do
|
24
|
+
checkbox(:id, "OpenExtendedTradingHoursSerivceId").click # using Watir directly
|
25
|
+
enter_text("Postcode_Locator__Postcode", "4061")
|
26
|
+
click_button_with_image("search_button.gif")
|
27
|
+
page_source.should include("Queen St Mall")
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
iTest2 Homepage: http://www.itest2.com
|
30
33
|
|