watir 1.4.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/watir-console +1 -0
- data/changes.rb +119 -0
- data/license.rb +37 -0
- data/readme.rb +55 -120
- data/unittests/buttons_test.rb +107 -104
- data/unittests/buttons_xpath_test.rb +69 -0
- data/unittests/checkbox_test.rb +154 -141
- data/unittests/checkbox_xpath_test.rb +107 -0
- data/unittests/core_tests.rb +6 -2
- data/unittests/css_test.rb +50 -50
- data/unittests/defer_test.rb +47 -0
- data/unittests/dialog_test.rb +78 -0
- data/unittests/div2_xpath_test.rb +22 -0
- data/unittests/div_test.rb +159 -159
- data/unittests/div_xpath_test.rb +96 -0
- data/unittests/errorchecker_test.rb +22 -22
- data/unittests/filefield_test.rb +30 -23
- data/unittests/filefield_xpath_test.rb +35 -0
- data/unittests/form_test.rb +250 -229
- data/unittests/form_xpath_test.rb +253 -0
- data/unittests/frame_test.rb +123 -108
- data/unittests/google_form_test.rb +17 -0
- data/unittests/html/JavascriptClick.html +39 -0
- data/unittests/html/buttons1.html +3 -2
- data/unittests/html/checkboxes1.html +32 -14
- data/unittests/html/complex_table.html +1 -1
- data/unittests/html/depot_store.html +59 -0
- data/unittests/html/div.html +3 -21
- data/unittests/html/div_xml.html +21 -0
- data/unittests/html/fileupload.html +2 -2
- data/unittests/html/forms2.html +3 -3
- data/unittests/html/forms3.html +2 -2
- data/unittests/html/frame_links.html +2 -2
- data/unittests/html/google_india.html +119 -0
- data/unittests/html/iframeTest.html +2 -2
- data/unittests/html/images/map.GIF +0 -0
- data/unittests/html/images/map2.gif +0 -0
- data/unittests/html/images1.html +17 -2
- data/unittests/html/javascriptevents.html +3 -7
- data/unittests/html/links1.html +9 -8
- data/unittests/html/links_multi.html +14 -0
- data/unittests/html/list_matters.html +720 -0
- data/unittests/html/lists.html +18 -0
- data/unittests/html/map_test.html +31 -0
- data/unittests/html/modal_dialog.html +10 -0
- data/unittests/html/modal_dialog_launcher.html +12 -0
- data/unittests/html/new_browser.html +17 -0
- data/unittests/html/pass.html +3 -0
- data/unittests/html/popups1.html +1 -1
- data/unittests/html/pre.html +28 -0
- data/unittests/html/radioButtons1.html +6 -5
- data/unittests/html/selectboxes1.html +12 -11
- data/unittests/html/simple_table.html +1 -1
- data/unittests/html/simple_table_columns.html +1 -1
- data/unittests/html/table1.html +1 -1
- data/unittests/html/tableCell_using_xpath.html +19 -0
- data/unittests/html/textfields1.html +6 -4
- data/unittests/html/xpath_nbsp.html +12 -0
- data/unittests/ie_exists_test.rb +32 -0
- data/unittests/ie_mock.rb +78 -79
- data/unittests/ie_test.rb +39 -39
- data/unittests/images_test.rb +132 -155
- data/unittests/images_xpath_test.rb +91 -0
- data/unittests/links_multi_test.rb +36 -0
- data/unittests/links_test.rb +158 -152
- data/unittests/links_xpath_test.rb +40 -0
- data/unittests/lists_test.rb +29 -0
- data/unittests/map_test.rb +99 -0
- data/unittests/minmax_test.rb +23 -23
- data/unittests/navigate_test.rb +43 -51
- data/unittests/nbsp_xpath_test.rb +18 -0
- data/unittests/other/WindowLogonExample.rb +28 -0
- data/unittests/{WindowLogonExtra.rb → other/WindowLogonExtra.rb} +0 -0
- data/unittests/{all_tests_concurrent.rb → other/all_tests_concurrent.rb} +23 -23
- data/unittests/other/navigate_exception_test.rb +14 -0
- data/unittests/other/rexml_unit_test.rb +24 -0
- data/unittests/other/testcase_method_order_test.rb +36 -0
- data/unittests/other/testcase_verify_test.rb +25 -0
- data/unittests/other/wait_until_test.rb +99 -0
- data/unittests/pagecontainstext_test.rb +56 -37
- data/unittests/parent_child_test.rb +55 -0
- data/unittests/popups_test.rb +37 -37
- data/unittests/pre_test.rb +52 -0
- data/unittests/radios_test.rb +186 -155
- data/unittests/radios_xpath_test.rb +101 -0
- data/unittests/screen_capture_test.rb +41 -41
- data/unittests/selectbox_test.rb +223 -181
- data/unittests/selectbox_xpath_test.rb +113 -0
- data/unittests/setup.rb +29 -25
- data/unittests/speed_settings_test.rb +22 -0
- data/unittests/table_cell_using_xpath_test.rb +40 -0
- data/unittests/table_test.rb +315 -284
- data/unittests/table_xpath_test.rb +114 -0
- data/unittests/textarea_test.rb +81 -0
- data/unittests/textarea_xpath_test.rb +82 -0
- data/unittests/textfields_test.rb +205 -229
- data/unittests/textfields_xpath_test.rb +111 -0
- data/unittests/window_tests.rb +7 -0
- data/unittests/windows/attach_to_existing_window_test.rb +52 -0
- data/unittests/windows/attach_to_new_window_test.rb +82 -0
- data/unittests/windows/close_window_test.rb +22 -0
- data/unittests/windows/frame_links_test.rb +25 -0
- data/unittests/windows/ie-each_test.rb +48 -0
- data/unittests/windows/iedialog_test.rb +55 -0
- data/unittests/windows/js_events_test.rb +57 -0
- data/unittests/windows/jscriptExtraAlert.rb +6 -0
- data/unittests/windows/jscriptExtraConfirmCancel.rb +7 -0
- data/unittests/windows/jscriptExtraConfirmOk.rb +7 -0
- data/unittests/{jscriptPushButton.rb → windows/jscriptPushButton.rb} +1 -1
- data/unittests/windows/jscript_test.rb +64 -0
- data/unittests/windows/modal_dialog_test.rb +127 -0
- data/unittests/windows/new.rb +56 -0
- data/unittests/windows/open_close_test.rb +22 -0
- data/unittests/windows/send_keys_test.rb +34 -0
- data/unittests/xpath_tests.rb +10 -0
- data/watir.rb +4344 -3565
- data/watir/IEDialog/Release/IEDialog.dll +0 -0
- data/watir/WindowHelper.rb +13 -11
- data/watir/assertions.rb +36 -0
- data/watir/camel_case.rb +14 -5
- data/watir/close_all.rb +38 -0
- data/watir/contrib/enabled_popup.rb +21 -0
- data/watir/contrib/ie-new-process.rb +27 -0
- data/watir/contrib/page_checker.rb +29 -0
- data/watir/contrib/visible.rb +47 -0
- data/watir/cookiemanager.rb +4 -4
- data/watir/datahandler.rb +107 -0
- data/watir/dialog.rb +46 -0
- data/watir/elements.rb +65 -0
- data/watir/exceptions.rb +18 -36
- data/watir/ie-process.rb +40 -0
- data/watir/irb-history.rb +31 -0
- data/watir/process.rb +20 -0
- data/watir/testUnitAddons.rb +3 -42
- data/watir/testcase.rb +58 -0
- data/watir/utils.rb +20 -0
- data/watir/waiter.rb +88 -0
- data/watir/watir_simple.rb +4 -4
- data/watir/win32ole.rb +8 -0
- data/watir/win32ole/win32ole.so +0 -0
- data/watir/winClicker.rb +374 -400
- metadata +209 -128
- data/unittests/WindowLogonExample.rb +0 -30
- data/unittests/attachToExistingWindow_test.rb +0 -40
- data/unittests/js_events_test.rb +0 -77
- data/unittests/jscriptExtraAlert.rb +0 -6
- data/unittests/jscriptExtraConfirmCancel.rb +0 -7
- data/unittests/jscriptExtraConfirmOk.rb +0 -7
- data/unittests/jscript_test.rb +0 -57
- data/unittests/send_keys_test.rb +0 -29
- data/unittests/textAreafields_test.rb +0 -81
metadata
CHANGED
@@ -1,152 +1,233 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.
|
2
|
+
rubygems_version: 0.9.2
|
3
3
|
specification_version: 1
|
4
4
|
name: watir
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.
|
7
|
-
date:
|
6
|
+
version: 1.5.2
|
7
|
+
date: 2007-09-03 00:00:00 -05:00
|
8
8
|
summary: Automated testing tool for web applications.
|
9
9
|
require_paths:
|
10
|
-
|
10
|
+
- .
|
11
11
|
email: wtr-general@rubyforge.org
|
12
12
|
homepage: http://wtr.rubyforge.org/
|
13
13
|
rubyforge_project: Web Testing with Ruby
|
14
|
-
description:
|
15
|
-
is a free, open-source functional testing tool for automating browser-based
|
16
|
-
tests of web applications. Watir drives the Internet Explorer browser the same
|
17
|
-
way an end user would. It clicks links, fills in forms, presses buttons. Watir
|
18
|
-
also checks results, such as whether expected text appears on the page. Watir is
|
19
|
-
a Ruby library that works with Internet Explorer on Windows."
|
14
|
+
description: WATIR is "Web Application Testing in Ruby". Watir (pronounced water) is a free, open-source functional testing tool for automating browser-based tests of web applications. It works with applications written in any language. Watir drives the Internet Explorer browser the same way an end user would. It clicks links, fills in forms, presses buttons. Watir also checks results, such as whether expected text appears on the page, or whether a control is enabled. Watir can test web applications written in any language. Watir is a Ruby library that works with Internet Explorer on Windows.
|
20
15
|
autorequire: watir
|
21
16
|
default_executable:
|
22
17
|
bindir: bin
|
23
18
|
has_rdoc: true
|
24
19
|
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
25
20
|
requirements:
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
version: 0.0.0
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
30
24
|
version:
|
31
25
|
platform: ruby
|
26
|
+
signing_key:
|
27
|
+
cert_chain:
|
28
|
+
post_install_message:
|
32
29
|
authors:
|
33
|
-
|
30
|
+
- Bret Pettichord
|
34
31
|
files:
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
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
|
-
|
32
|
+
- watir.rb
|
33
|
+
- watir/assertions.rb
|
34
|
+
- watir/camel_case.rb
|
35
|
+
- watir/clickJSDialog.rb
|
36
|
+
- watir/close_all.rb
|
37
|
+
- watir/cookiemanager.rb
|
38
|
+
- watir/datahandler.rb
|
39
|
+
- watir/dialog.rb
|
40
|
+
- watir/elements.rb
|
41
|
+
- watir/exceptions.rb
|
42
|
+
- watir/ie-process.rb
|
43
|
+
- watir/irb-history.rb
|
44
|
+
- watir/process.rb
|
45
|
+
- watir/screen_capture.rb
|
46
|
+
- watir/setFileDialog.rb
|
47
|
+
- watir/testcase.rb
|
48
|
+
- watir/testUnitAddons.rb
|
49
|
+
- watir/utils.rb
|
50
|
+
- watir/waiter.rb
|
51
|
+
- watir/watir_simple.rb
|
52
|
+
- watir/win32ole.rb
|
53
|
+
- watir/winClicker.rb
|
54
|
+
- watir/WindowHelper.rb
|
55
|
+
- watir/AutoItX3.dll
|
56
|
+
- unittests/all_tests.rb
|
57
|
+
- unittests/buttons_test.rb
|
58
|
+
- unittests/buttons_xpath_test.rb
|
59
|
+
- unittests/checkbox_test.rb
|
60
|
+
- unittests/checkbox_xpath_test.rb
|
61
|
+
- unittests/core_tests.rb
|
62
|
+
- unittests/css_test.rb
|
63
|
+
- unittests/defer_test.rb
|
64
|
+
- unittests/dialog_test.rb
|
65
|
+
- unittests/div2_xpath_test.rb
|
66
|
+
- unittests/div_test.rb
|
67
|
+
- unittests/div_xpath_test.rb
|
68
|
+
- unittests/errorchecker_test.rb
|
69
|
+
- unittests/filefield_test.rb
|
70
|
+
- unittests/filefield_xpath_test.rb
|
71
|
+
- unittests/form_test.rb
|
72
|
+
- unittests/form_xpath_test.rb
|
73
|
+
- unittests/frame_test.rb
|
74
|
+
- unittests/google_form_test.rb
|
75
|
+
- unittests/ie_exists_test.rb
|
76
|
+
- unittests/ie_mock.rb
|
77
|
+
- unittests/ie_test.rb
|
78
|
+
- unittests/images_test.rb
|
79
|
+
- unittests/images_xpath_test.rb
|
80
|
+
- unittests/iostring.rb
|
81
|
+
- unittests/iostring_test.rb
|
82
|
+
- unittests/links_multi_test.rb
|
83
|
+
- unittests/links_test.rb
|
84
|
+
- unittests/links_xpath_test.rb
|
85
|
+
- unittests/lists_test.rb
|
86
|
+
- unittests/map_test.rb
|
87
|
+
- unittests/minmax_test.rb
|
88
|
+
- unittests/navigate_test.rb
|
89
|
+
- unittests/nbsp_xpath_test.rb
|
90
|
+
- unittests/non_core_tests.rb
|
91
|
+
- unittests/pagecontainstext_test.rb
|
92
|
+
- unittests/parent_child_test.rb
|
93
|
+
- unittests/popups_test.rb
|
94
|
+
- unittests/pre_test.rb
|
95
|
+
- unittests/radios_test.rb
|
96
|
+
- unittests/radios_xpath_test.rb
|
97
|
+
- unittests/screen_capture_test.rb
|
98
|
+
- unittests/selectbox_test.rb
|
99
|
+
- unittests/selectbox_xpath_test.rb
|
100
|
+
- unittests/setup.rb
|
101
|
+
- unittests/speed_settings_test.rb
|
102
|
+
- unittests/table_cell_using_xpath_test.rb
|
103
|
+
- unittests/table_test.rb
|
104
|
+
- unittests/table_xpath_test.rb
|
105
|
+
- unittests/textarea_test.rb
|
106
|
+
- unittests/textarea_xpath_test.rb
|
107
|
+
- unittests/textfields_test.rb
|
108
|
+
- unittests/textfields_xpath_test.rb
|
109
|
+
- unittests/window_tests.rb
|
110
|
+
- unittests/xpath_tests.rb
|
111
|
+
- unittests/html/blankpage.html
|
112
|
+
- unittests/html/buttons1.html
|
113
|
+
- unittests/html/checkboxes1.html
|
114
|
+
- unittests/html/complex_table.html
|
115
|
+
- unittests/html/cssTest.html
|
116
|
+
- unittests/html/depot_store.html
|
117
|
+
- unittests/html/div.html
|
118
|
+
- unittests/html/div_xml.html
|
119
|
+
- unittests/html/fileupload.html
|
120
|
+
- unittests/html/forms2.html
|
121
|
+
- unittests/html/forms3.html
|
122
|
+
- unittests/html/forms4.html
|
123
|
+
- unittests/html/formTest1.html
|
124
|
+
- unittests/html/frame_buttons.html
|
125
|
+
- unittests/html/frame_links.html
|
126
|
+
- unittests/html/frame_multi.html
|
127
|
+
- unittests/html/google_india.html
|
128
|
+
- unittests/html/iframeTest.html
|
129
|
+
- unittests/html/iframeTest1.html
|
130
|
+
- unittests/html/iframeTest2.html
|
131
|
+
- unittests/html/images1.html
|
132
|
+
- unittests/html/JavascriptClick.html
|
133
|
+
- unittests/html/javascriptevents.html
|
134
|
+
- unittests/html/links1.html
|
135
|
+
- unittests/html/links2.html
|
136
|
+
- unittests/html/links_multi.html
|
137
|
+
- unittests/html/link_pass.html
|
138
|
+
- unittests/html/lists.html
|
139
|
+
- unittests/html/list_matters.html
|
140
|
+
- unittests/html/map_test.html
|
141
|
+
- unittests/html/modal_dialog.html
|
142
|
+
- unittests/html/modal_dialog_launcher.html
|
143
|
+
- unittests/html/nestedFrames.html
|
144
|
+
- unittests/html/new_browser.html
|
145
|
+
- unittests/html/pass.html
|
146
|
+
- unittests/html/popups1.html
|
147
|
+
- unittests/html/pre.html
|
148
|
+
- unittests/html/radioButtons1.html
|
149
|
+
- unittests/html/selectboxes1.html
|
150
|
+
- unittests/html/select_tealeaf.html
|
151
|
+
- unittests/html/simple_table.html
|
152
|
+
- unittests/html/simple_table_buttons.html
|
153
|
+
- unittests/html/simple_table_columns.html
|
154
|
+
- unittests/html/table1.html
|
155
|
+
- unittests/html/tableCell_using_xpath.html
|
156
|
+
- unittests/html/textarea.html
|
157
|
+
- unittests/html/textfields1.html
|
158
|
+
- unittests/html/textsearch.html
|
159
|
+
- unittests/html/xpath_nbsp.html
|
160
|
+
- unittests/html/images/1.gif
|
161
|
+
- unittests/html/images/2.GIF
|
162
|
+
- unittests/html/images/3.GIF
|
163
|
+
- unittests/html/images/button.jpg
|
164
|
+
- unittests/html/images/circle.jpg
|
165
|
+
- unittests/html/images/map.GIF
|
166
|
+
- unittests/html/images/map2.gif
|
167
|
+
- unittests/html/images/minus.GIF
|
168
|
+
- unittests/html/images/originaltriangle.jpg
|
169
|
+
- unittests/html/images/plus.gif
|
170
|
+
- unittests/html/images/square.jpg
|
171
|
+
- unittests/html/images/triangle.jpg
|
172
|
+
- unittests/other/all_tests_concurrent.rb
|
173
|
+
- unittests/other/navigate_exception_test.rb
|
174
|
+
- unittests/other/rexml_unit_test.rb
|
175
|
+
- unittests/other/testcase_method_order_test.rb
|
176
|
+
- unittests/other/testcase_verify_test.rb
|
177
|
+
- unittests/other/wait_until_test.rb
|
178
|
+
- unittests/other/WindowLogonExample.rb
|
179
|
+
- unittests/other/WindowLogonExtra.rb
|
180
|
+
- unittests/windows/attach_to_existing_window_test.rb
|
181
|
+
- unittests/windows/attach_to_new_window_test.rb
|
182
|
+
- unittests/windows/close_window_test.rb
|
183
|
+
- unittests/windows/frame_links_test.rb
|
184
|
+
- unittests/windows/ie-each_test.rb
|
185
|
+
- unittests/windows/iedialog_test.rb
|
186
|
+
- unittests/windows/jscriptExtraAlert.rb
|
187
|
+
- unittests/windows/jscriptExtraConfirmCancel.rb
|
188
|
+
- unittests/windows/jscriptExtraConfirmOk.rb
|
189
|
+
- unittests/windows/jscriptPushButton.rb
|
190
|
+
- unittests/windows/jscript_test.rb
|
191
|
+
- unittests/windows/js_events_test.rb
|
192
|
+
- unittests/windows/modal_dialog_test.rb
|
193
|
+
- unittests/windows/new.rb
|
194
|
+
- unittests/windows/open_close_test.rb
|
195
|
+
- unittests/windows/send_keys_test.rb
|
196
|
+
- watir/IEDialog/Release/IEDialog.dll
|
197
|
+
- watir/win32ole/win32ole.so
|
198
|
+
- watir/contrib/enabled_popup.rb
|
199
|
+
- watir/contrib/ie-new-process.rb
|
200
|
+
- watir/contrib/page_checker.rb
|
201
|
+
- watir/contrib/visible.rb
|
202
|
+
- readme.rb
|
203
|
+
- changes.rb
|
204
|
+
- license.rb
|
132
205
|
test_files:
|
133
|
-
|
206
|
+
- unittests/core_tests.rb
|
134
207
|
rdoc_options:
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
208
|
+
- --title
|
209
|
+
- Watir API Reference
|
210
|
+
- --accessor
|
211
|
+
- def_wrap=R,def_wrap_guard=R,def_creator=R,def_creator_with_default=R
|
212
|
+
- --main
|
213
|
+
- Watir::IE
|
214
|
+
- --exclude
|
215
|
+
- unittests|camel_case.rb|testUnitAddons.rb
|
143
216
|
extra_rdoc_files: []
|
144
|
-
|
217
|
+
|
218
|
+
executables:
|
219
|
+
- watir-console
|
145
220
|
extensions: []
|
146
|
-
requirements:
|
147
|
-
- Microsoft Windows running Internet Explorer 5.5 or later.
|
148
|
-
- |2
|
149
|
-
Some Watir features require that an included DLL be registered. You'll have to do this manually:
|
150
|
-
> regsvr32.exe watirAutoItX3.dll
|
151
221
|
|
152
|
-
|
222
|
+
requirements:
|
223
|
+
- Microsoft Windows running Internet Explorer 5.5 or later.
|
224
|
+
dependencies:
|
225
|
+
- !ruby/object:Gem::Dependency
|
226
|
+
name: win32-process
|
227
|
+
version_requirement:
|
228
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
229
|
+
requirements:
|
230
|
+
- - ">="
|
231
|
+
- !ruby/object:Gem::Version
|
232
|
+
version: 0.5.1
|
233
|
+
version:
|
@@ -1,30 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__
|
4
|
-
require 'unittests/setup'
|
5
|
-
require 'watir/WindowHelper'
|
6
|
-
|
7
|
-
class TC_Logon_Test < Test::Unit::TestCase
|
8
|
-
include Watir
|
9
|
-
|
10
|
-
def goto_windows_login_page()
|
11
|
-
$ie.goto('http://clio.lyris.com/')
|
12
|
-
end
|
13
|
-
|
14
|
-
|
15
|
-
def test_window_logon()
|
16
|
-
|
17
|
-
a = Thread.new {
|
18
|
-
system('ruby WindowLogonExtra.rb')
|
19
|
-
|
20
|
-
}
|
21
|
-
b = Thread.new {
|
22
|
-
goto_windows_login_page()
|
23
|
-
}
|
24
|
-
a.join
|
25
|
-
b.join
|
26
|
-
end
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# feature tests for attaching to existing IE windows
|
2
|
-
# revision: $Revision: 1.8 $
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__
|
5
|
-
require 'unittests/setup'
|
6
|
-
|
7
|
-
class TC_ExistingWindow< Test::Unit::TestCase
|
8
|
-
include Watir
|
9
|
-
|
10
|
-
def goto_page(page)
|
11
|
-
$ie.goto($htmlRoot + page)
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_ExistingWindow
|
15
|
-
goto_page 'buttons1.html'
|
16
|
-
ie3=nil
|
17
|
-
|
18
|
-
assert_raises( NoMatchingWindowFoundException ) { ie3 = IE.attach(:title , "missing") }
|
19
|
-
assert_raises( NoMatchingWindowFoundException ) { ie3 = IE.attach(:title , /missing/) }
|
20
|
-
|
21
|
-
assert_raises( NoMatchingWindowFoundException ) { ie3 = IE.attach(:url , "missing") }
|
22
|
-
assert_raises( NoMatchingWindowFoundException ) { ie3 = IE.attach(:url , /missing/) }
|
23
|
-
|
24
|
-
ie3 = IE.attach(:title , /buttons/i )
|
25
|
-
assert_equal( "Test page for buttons" , ie3.title)
|
26
|
-
ie3=nil
|
27
|
-
|
28
|
-
ie3 = IE.attach(:title , "Test page for buttons" )
|
29
|
-
assert_equal( "Test page for buttons" , ie3.title)
|
30
|
-
ie3=nil
|
31
|
-
|
32
|
-
ie3 = IE.attach(:url, /buttons1.html/ )
|
33
|
-
assert_equal( "Test page for buttons" , ie3.title)
|
34
|
-
ie3=nil
|
35
|
-
|
36
|
-
#hard to test :url with explicit text
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
40
|
-
|
data/unittests/js_events_test.rb
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
# feature tests for JavaScript events
|
2
|
-
# revision: $Revision: 1.13 $
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__
|
5
|
-
require 'unittests/setup'
|
6
|
-
|
7
|
-
class TC_JSEvents < Test::Unit::TestCase
|
8
|
-
include Watir
|
9
|
-
|
10
|
-
|
11
|
-
def gotoJavaScriptEventsPage()
|
12
|
-
$ie.goto($htmlRoot + "javascriptevents.html")
|
13
|
-
end
|
14
|
-
|
15
|
-
|
16
|
-
def test_Button_disabled
|
17
|
-
gotoJavaScriptEventsPage()
|
18
|
-
assert_false($ie.button(:caption, "Button 1").enabled?)
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_Button_Enabled
|
22
|
-
gotoJavaScriptEventsPage()
|
23
|
-
|
24
|
-
$ie.text_field(:name, "entertext").fire_event("onkeyup")
|
25
|
-
assert($ie.button(:caption, "Button 1").enabled?)
|
26
|
-
|
27
|
-
end
|
28
|
-
|
29
|
-
def test_Button_click
|
30
|
-
|
31
|
-
gotoJavaScriptEventsPage()
|
32
|
-
|
33
|
-
puts "Firing event to make button enabled"
|
34
|
-
$ie.text_field(:name, "entertext").fire_event("onKeyUp")
|
35
|
-
puts "Clicking the button"
|
36
|
-
|
37
|
-
$ie.button(:caption, "Button 1").click
|
38
|
-
assert($ie.contains_text("PASS") )
|
39
|
-
end
|
40
|
-
|
41
|
-
#onMouseOver tests
|
42
|
-
#window status
|
43
|
-
|
44
|
-
def test_no_status_bar_exception
|
45
|
-
gotoJavaScriptEventsPage()
|
46
|
-
$ie.link(:text, "New Window No Status Bar").click
|
47
|
-
status_bar_test_win = nil
|
48
|
-
assert_nothing_raised { status_bar_test_win = Watir::IE.attach(:title, "Pass Page") }
|
49
|
-
assert_raises( Watir::NoStatusBarException ) { status_bar_test_win.status }
|
50
|
-
status_bar_test_win.close
|
51
|
-
status_bar_test_win = nil
|
52
|
-
|
53
|
-
end
|
54
|
-
|
55
|
-
|
56
|
-
def test_page_nostatus
|
57
|
-
gotoJavaScriptEventsPage()
|
58
|
-
assert_false($ie.status == "Here is your status")
|
59
|
-
end
|
60
|
-
|
61
|
-
def test_page_status
|
62
|
-
gotoJavaScriptEventsPage()
|
63
|
-
$ie.link(:text, "Check the Status").fire_event("onMouseOver")
|
64
|
-
assert($ie.status, "It worked")
|
65
|
-
end
|
66
|
-
|
67
|
-
def test_page_status
|
68
|
-
gotoJavaScriptEventsPage()
|
69
|
-
$ie.link(:text, "Clear the Status").fire_event("onMouseOver")
|
70
|
-
assert($ie.status, "")
|
71
|
-
end
|
72
|
-
#end of window status
|
73
|
-
|
74
|
-
#end of onMouseOver tests
|
75
|
-
|
76
|
-
end
|
77
|
-
|