|
Summary
This example script demonstrates eValid interacting with Notepad,
a Windows desktop application.
The test plan summary is as follows:
- Open a NOTEPAD.EXE instance with a SystemCall command.
- Start on THIS page.
- Confirm that this is the correct page by highlighting and synchronizing on THIS SELECTED TEXT.
- Type a short message into the Notepad window using eValid's "Advanced Recording" modes for desktop and windows application specific options.
- Validate that part of the typed-in message [image] is present using a
Validate -> & Synchronize -> Screen Rectangle
(or)
Validate -> & Save -> Screen Rectangle command.The & Save choice will create a baseline file during recording and inserts a script command that performs a file-to-file comparison during playback, instead of only the checksum that is generated in the & Synchronize case.
- Quit the Notepad instance and discard the typed in material.
- Note total time with an ElapsedTime command.
Scenario
The example script below was created using a Windows Vista Home Basic SP1 environment and demonstrates eValid interacting with a version of Notepad only.
Sample Script
Here is a sample script that includes typical instances of these
commands, plus screenshots of how they appear on the desktop.
# Recording by eValid V9 # Recording made on: Microsoft Windows ProjectID "Support" GroupID "Demos" TestID "baseline_notepad" LogID "AUTO" ScreenSize 1280 1024 FontSize 2 DeleteCache DeleteCookies # Please make sure that eValid registers your application on the desktop... SystemCall "notepad.exe" # The SystemCall goes first to assure that the Notepad winow is really present... InitLink "http://www.e-valid.com/Products/Documentation.9/Support/" \ "Desktop/baseline.notepad.html" Wait 2000 SyncOnText 0 "THIS SELECTED TEXT" "" #Breakpoint Delay 2000 # Application Mode ON Wait 2150 # Please make sure that your window title matches... DWindowSet 1 "Untitled - Notepad" 154 154 1080 636 Wait 5938 # Included extra top/bottom spacing to avoid conflicts with interactive cursor/margins... ResetTimer "Start type-in" KeySys 1 9 0 1 Wait 1692 KeySys 1 13 0 1 Wait 1820 KeySys 1 9 0 1 Wait 5340 KeyText 1 "This is a test" KeySys 1 13 0 1 Wait 2812 KeySys 1 9 0 1 Wait 5469 KeyText 1 "HELLO WORLD" KeySys 1 13 0 1 Wait 492 KeySys 1 13 0 1 Wait 540 KeySys 1 13 0 1 Wait 5845 # Make sure that your intended window is in focus before any captures... xySyncRect 1 212 207 140 52 2287231 Wait 5386 # Make sure that your intended window has focus and provide the baseline # file named "entry-B.bmp"... ValidateSavedScreenRect 1 "entry" 212 207 140 52 Wait 4706 # Below is the recorded exit sequence done with the keyboard (not the mouse)... KeySys 1 70 4 1 Wait 5700 KeyText -1 "x" KeySys -1 9 0 1 Wait 2380 KeySys -1 13 0 1 Wait 175 # The above sequence eliminates the need for a WindowClose 1, but you # may need to restore it depending on the system you are using... # WindowClose 1 ElapsedTime "End type-in" # End of Script. |
Sample Screenshots
Here are the resulting windows from playback of the above script.
Part of Notepad's Working Area Showing Type-ins Done By Script
Validation by CHECKSUM of image (or) BASELINE vs. RESPONSE files...
Screenshot of Top Part of This Page with Green Screen Playback Summary
Notes
Cautionary Note
Windows desktops vary significantly and there is a chance that the above
script may not play back correctly on your desktop.
In that case you may need to re-record the script, using the one above as the pattern,
to get all of the desktop geometry data correct.