Your e-Business Quality Partner eValid™ -- Automated Web Quality Solution
Browser-Based, Client-Side, Functional Testing & Validation,
Load & Performance Tuning, Page Timing, Website Analysis,
and Rich Internet Application Monitoring.
© Copyright 2000-2012 by Software Research, Inc.

eValid -- Example eValid Scripts -- File Download Sample
Go Back To Sample Script Catalog
eValid Home

Description of Script
This script illustrates how eValid handles a download process. Basically, the script uses modal dialog playbacks to select "Save" on the "File Download Dialog Box" and then uses a series of tabs and a filename typein to set up the "Save As" file.

Script Playback
The script shown in the table below can be copied and pasted into the Script Dialog for playback by eValid:

  1. Left click drag from the top line to the bottom line of the script.
  2. Right click Copy to capture the script.
  3. Open the eValid Script Window with eValid: Window > Script Window.
  4. Create a new script with File > New.
  5. Delete the existing text that eValid automatically inserts in the new script window.
  6. Right Click Paste to insert the saved script in the Script Window.
  7. Perform any necessary edits, e.g. to remove duplicated InitLink or other unwanted commands.
  8. Click File > Save As to save the script in the filename of your choice, in the test Group of your choice, and in the test Project of your choice.

Important Note: This script is an example and may not work with your environment or setup. You may need to re-record a similar script to get correct resultes.

Example Script
# 
# Recording by eValid V8
# (c) Copyright 2000-2012 by Software Research, Inc. 
# Recording made on: Microsoft Windows 2000 SP3 (IE 6.0), HostName "bulgaria" 
# 

ProjectID "Examples"
GroupID "Modals"
TestID "file-download"
LogID "AUTO"
ScreenSize 1024 768
FontSize 2

InitLink "http://www.download.com/"
Wait 4997
ElementMouseOver 0 86 "searchGo" "" ""
Wait 1641
InputValue 0 80 "TEXT" "qt" "telnet" "" ""
Wait 120
InputImageClick 0 86 "http://i.i.com.com/cnwk.1d/i/dl/glb/go_button_over.gif" "" "" NAV 
Wait 5778 
ElementMouseOver 0 88 "adv" "" "" 
Wait 6790 
ElementMouseOut 0 88 "adv" "" "" 

FollowLink 0 234 "Download Now" "javascript:downloadNow" \
	"('ftp://ftp.download.com/pub/ppd/10125963-10265267/zoc_win_english.exe','/redir" \
	"?pid=10265267&merid=52138&mfgid=52138<ype=dl_elite_dlnow&lop=link" \
	"&edId=3&siteId=4&oId=3120-2085-10265267&ontId=2085&" \
	"destUrl=/3001-2085-10265267.html','0');" "" 
 
Wait 9790

# These modal dialog commands feed the required data into the two modal 
# dialog boxes (see examples below...
#
# Note: This passage assumes that the file was NOT downloaded previously.
# If it was you need to add a section to say OK to overwriting the file.       

# Here we reset the clock to start timing the download...
ResetTimer

# ModalDialogWait n - wait 'n' msecs on a Modal Dialog 
ModalDialogWait 2000 

# ModalDialogEnter - close a Modal Dialog by sending Enter message to active button 
ModalDialogEnter 

# ModalDialogWait n - wait 'n' msecs on a Modal Dialog 
ModalDialogWait 2000 

# ModalDialogTab 0|1 - Tab forward (0) or back (1) on a Modal Dialog 
ModalDialogTab 0 

# ModalDialogWait n - wait 'n' msecs on a Modal Dialog 
ModalDialogWait 2000 

# ModalDialogTab 0|1 - Tab forward (0) or back (1) on a Modal Dialog 
ModalDialogTab 0 

# ModalDialogWait n - wait 'n' msecs on a Modal Dialog 
ModalDialogWait 2000 

# ModalDialogEnter - close a Modal Dialog by sending Enter message to active button 
ModalDialogEnter

Wait 26899
# Apply Record > Advanced Recording > Recod Desktop Window (Ctrl + F12) Mode...
DWindowSet 1 "Download complete" 105 80 374 261

# Apply Record > Validate > &Synchronize > Screen Rectangle (Ctrl + Q) Mode...
xySyncRect 1 155 110 152 56 2480461

# Close Modal download window...
WindowClose 1

# Now we read the total time for the download into the timing log...
ElapsedTime

# End of script. 

Additional Notes
The scripts eValid creates use one command per line.

File Download Screen: Modal Dialog

Save As: Modal Dialog

Save As: Modal Dialog