1
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
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
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
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
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- NOTE: place a hash infront of all comments that are for inclusion in wiki documentation, so that the hash can be used to extract just those lines -->
<!-- NOTE: make the following substitutions prior to running this test:
* FileSender Test - name of authenticated user
* email1 - email address of authenticated user
* email2 - email address of first file / voucher recipient
* email3 - email address of second file / voucher recipient
* FileSender_testfiles - filepath to directory containing files to upload
-->
<!-- FileSender installation url -->
<link rel="selenium.base" href="https://filesender.surfnet.nl/preview/index.php" />
<!-- Test title = filename; not displayed in Selenium IDE window or html view -->
<title>upload_ASCII_singlerecipient_defaultfields_HTML5</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<!-- Table header = full name of test; displayed in html view -->
<thead>
<tr>
<td rowspan="1" colspan="3">Authenticated ASCII file upload, single recipient, default field contents, upload prompts - HTML5</td></tr>
</thead>
<tbody>
<!-- Test workflow begins here -->
<tr>
<td>clickAndWait</td>
<td>css=#topmenu_newupload</td>
<td></td>
</tr>
<!-- ## verify links across top of page -->
<tr>
<td>verifyElementPresent</td>
<td>css=#topmenu_newupload</td>
<td>Send File</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>css=#topmenu_vouchers</td>
<td>Guest Voucher</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>css=#topmenu_myfiles</td>
<td>My Files</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>css=#topmenu_help</td>
<td>Help</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>css=#topmenu_about</td>
<td>About</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>css=#topmenu_logoff</td>
<td>Log Off</td>
</tr>
<!-- ## verify that name is displayed in top left corner "Welcome [first name surname]" -->
<!-- NOTE: changeable variable -->
<tr>
<td>verifyText</td>
<td>css=div.welcomeuser</td>
<td>Welcome FileSender Test</td>
</tr>
<!-- ## verify title of panel is "Send a file" -->
<tr>
<td>verifyText</td>
<td>id=pageheading</td>
<td>Send a file</td>
</tr>
<!-- ## verify but leave "To" field blank -->
<!-- TO DO - work out how to verify tooltip "Multiple email addresses can be entered separated by comma or semi-colon (, or ;)" -->
<tr>
<td>verifyText</td>
<td>id=upload_to</td>
<td>To:</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>id=fileto</td>
<td></td>
</tr>
<!-- ## verify that "From" is auto-populated with sender's email address -->
<tr>
<td>verifyText</td>
<td>upload_from</td>
<td>From:</td>
</tr>
<!-- NOTE: changeable variable -->
<tr>
<td>verifyTextPresent</td>
<td>email1</td>
<td></td>
</tr>
<!-- ## verify, but leave "Subject" and "Message" fields blank or default to verify defaults in email -->
<tr>
<td>verifyText</td>
<td>id=upload_subject</td>
<td>Subject: (optional)</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>id=filesubject</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>upload_message</td>
<td>Message: (optional)</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>id=filemessage</td>
<td></td>
</tr>
<!-- ## verify expiry date field, but leave as default to verify in email -->
<tr>
<td>verifyText</td>
<td>id=upload_expirydate</td>
<td>Expiry date:</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>id=datepicker</td>
<td></td>
</tr>
<!-- ## verify "I accept the terms and conditions of this service" AUP box and that it is not checked, but do not check box -->
<tr>
<td>verifyText</td>
<td>id=aup_label</td>
<td>I accept the terms and conditions of this service. [Show/Hide]</td>
</tr>
<tr>
<td>verifyNotChecked</td>
<td>id=aup</td>
<td></td>
</tr>
<!-- ## click on "Browse" button and select the following file sizes (ASCII only): -->
<tr>
<td>verifyText</td>
<td>id=selectfile</td>
<td>Select your file:</td>
</tr>
<tr>
<td>click</td>
<td>id=fileName</td>
<td></td>
</tr>
<!-- ## - zero KB - prompt should appear "File size cannot be 0. Please select another file.", "Send" button should *not* appear -->
<tr>
<td>type</td>
<td>id=fileToUpload</td>
<td>FileSender_testfiles/0.dat</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>File size cannot be 0. Please select another file.</td>
<td></td>
</tr>
<tr>
<td>verifyTextNotPresent</td>
<td>Name: 0.dat</td>
<td></td>
</tr>
<tr>
<td>verifyTextNotPresent</td>
<td>Size: 0 Bytes</td>
<td></td>
</tr>
<tr>
<td>verifyNotVisible</td>
<td>id=uploadbutton</td>
<td></td>
</tr>
<!-- ## - .bat, .exe file - prompt should appear "Invalid file extension. Please select another file.", "Send" button should *not* appear -->
<tr>
<td>type</td>
<td>id=fileToUpload</td>
<td>FileSender_testfiles/Executable.bat</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Invalid file extension. Please select another file.</td>
<td></td>
</tr>
<tr>
<td>verifyTextNotPresent</td>
<td>Name: Executable.bat</td>
<td></td>
</tr>
<tr>
<td>verifyTextNotPresent</td>
<td>Size: 343 Bytes</td>
<td></td>
</tr>
<tr>
<td>verifyNotVisible</td>
<td>id=uploadbutton</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=fileToUpload</td>
<td>FileSender_testfiles/Executable.exe</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Invalid file extension. Please select another file.</td>
<td></td>
</tr>
<tr>
<td>verifyTextNotPresent</td>
<td>Name: Executable.exe</td>
<td></td>
</tr>
<tr>
<td>verifyTextNotPresent</td>
<td>Size: 343 Bytes</td>
<td></td>
</tr>
<tr>
<td>verifyNotVisible</td>
<td>id=uploadbutton</td>
<td></td>
</tr>
<!-- ## - .ex file - file name, size and type should be displayed, "Send" button *should* now appear -->
<tr>
<td>type</td>
<td>id=fileToUpload</td>
<td>FileSender_testfiles/test.ex</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Name: test.ex</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Size: 343 Bytes</td>
<td></td>
</tr>
<tr>
<td>verifyVisible</td>
<td>id=uploadbutton</td>
<td></td>
</tr>
<!-- ## - 2 GB (and 1 MB below), 4 GB (and 1 MB below), 5 GB - file name, size and type should be displayed, "Send" button *should* now appear -->
<tr>
<td>type</td>
<td>id=fileToUpload</td>
<td>FileSender_testfiles/2G-random.dat</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Name: 2G-random.dat</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Size: 2 GB</td>
<td></td>
</tr>
<tr>
<td>verifyVisible</td>
<td>id=uploadbutton</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=fileToUpload</td>
<td>FileSender_testfiles/2G-1M-random.dat</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Name: 2G-1M-random.dat</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Size: 2 GB</td>
<td></td>
</tr>
<tr>
<td>verifyVisible</td>
<td>id=uploadbutton</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=fileToUpload</td>
<td>FileSender_testfiles/4G-random.dat</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Name: 4G-random.dat</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Size: 4 GB</td>
<td></td>
</tr>
<tr>
<td>verifyVisible</td>
<td>id=uploadbutton</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=fileToUpload</td>
<td>FileSender_testfiles/4G-1M-random.dat</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Name: 4G-1M-random.dat</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Size: 4 GB</td>
<td></td>
</tr>
<tr>
<td>verifyVisible</td>
<td>id=uploadbutton</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=fileToUpload</td>
<td>FileSender_testfiles/5G-random.dat</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Name: 5G-random.dat</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Size: 5 GB</td>
<td></td>
</tr>
<tr>
<td>verifyVisible</td>
<td>id=uploadbutton</td>
<td></td>
</tr>
<!-- ## - over 5GB - prompt should appear "File size cannot be greater than X GB [where X is the configured maximum]. Please select another file.", "Send" button should *not* appear -->
<tr>
<td>type</td>
<td>id=fileToUpload</td>
<td>FileSender_testfiles/over5G-random.dat</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>File size cannot be greater than 5 GB. Please select another file.</td>
<td></td>
</tr>
<tr>
<td>verifyNotVisible</td>
<td>id=uploadbutton</td>
<td></td>
</tr>
<!-- ## - small ASCII text file - file name, size and type should be displayed, "Send" button *should* now appear -->
<tr>
<td>type</td>
<td>id=fileToUpload</td>
<td>FileSender_testfiles/TestUpload.txt</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Name: TestUpload.txt</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Size: 343 Bytes</td>
<td></td>
</tr>
<tr>
<td>verifyVisible</td>
<td>id=uploadbutton</td>
<td></td>
</tr>
<!-- ## click on "Send" button, prompts should appear: "Invalid or missing email" and "You MUST agree to the terms and conditions." -->
<tr>
<td>click</td>
<td>link=Send</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Invalid or missing email</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>You MUST agree to the terms and conditions.</td>
<td></td>
</tr>
<!-- ## enter one recipient email address (only) in the "To" field -->
<!-- NOTE: changeable variable -->
<tr>
<td>type</td>
<td>id=fileto</td>
<td>email3</td>
</tr>
<!-- ## click on "Send" button again -->
<tr>
<td>click</td>
<td>link=Send</td>
<td></td>
</tr>
<!-- ## prompt should appear: "You MUST agree to the terms and conditions." -->
<tr>
<td>verifyTextPresent</td>
<td>You MUST agree to the terms and conditions.</td>
<td></td>
</tr>
<!-- ## show and verify AUP text, hide AUP text, check the AuP box -->
<tr>
<td>click</td>
<td>id=aup_label</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>AuP Terms and conditions</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=aup_label</td>
<td></td>
</tr>
<tr>
<td>verifyTextNotPresent</td>
<td>AuP Terms and conditions</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=aup</td>
<td></td>
</tr>
<!-- ## click on "Send" button again, progress bar should appear, when complete new page should be displayed with text "Your file has been uploaded and message sent" -->
<tr>
<td>click</td>
<td>link=Send</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Upload progress: TestUpload.txt (343 Bytes)</td>
<td></td>
</tr>
<tr>
<td>waitForText</td>
<td>id=message</td>
<td>Your file has been uploaded and message sent.</td>
</tr>
<!-- ## go to "My Files" table, verify title of panel is "My Files", verify table headers and action buttons -->
<tr>
<td>clickAndWait</td>
<td>css=#topmenu_myfiles</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>id=pageheading</td>
<td>My Files</td>
</tr>
<tr>
<td>verifyText</td>
<td>css=#myfiles_header_to</td>
<td>To</td>
</tr>
<tr>
<td>verifyText</td>
<td>css=#myfiles_header_from</td>
<td>From</td>
</tr>
<tr>
<td>verifyText</td>
<td>css=#myfiles_header_filename</td>
<td>File Name</td>
</tr>
<tr>
<td>verifyText</td>
<td>css=#myfiles_header_size</td>
<td>Size</td>
</tr>
<tr>
<td>verifyText</td>
<td>css=#myfiles_header_subject</td>
<td>Subject</td>
</tr>
<tr>
<td>verifyText</td>
<td>css=#myfiles_header_message</td>
<td>Message</td>
</tr>
<tr>
<td>verifyText</td>
<td>css=#myfiles_header_created</td>
<td>Created</td>
</tr>
<tr>
<td>verifyText</td>
<td>css=#myfiles_header_expiry</td>
<td>Expiry</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>id=btn_addrecipient_1</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>id=btn_resendemail_1</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>id=btn_deletevoucher_1</td>
<td></td>
</tr>
<!-- ## Verify that file is listed in "My Files" table -->
<!-- TO DO - work out how to click on the filename in the My Files table of uploaded ASCII file to download the file -->
<tr>
<td>verifyTextPresent</td>
<td>TestUpload.txt</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>343 Bytes</td>
<td></td>
</tr>
<!-- NOTE: change date in line with default expiry date selected above -->
<tr>
<td>verifyTextPresent</td>
<td>31/05/2012</td>
<td></td>
</tr>
<!-- test workflow ends here -->
</tbody></table>
</body>
</html> |