|
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:
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.