|
Summary
This page explains the steps needed to validate
the contents of an object using
its known name and value property.
This example involves 16 steps needed to make the eValid recording,
which results in a script that has about 8 essential commands total.
Example Goals
Here is an example using www.x-rates.com's webpage containing objects to CALCULATE currency conversion rates.
[NOTE: The script's property values will fluctuate due to real time currency exchange rates.]
Script Development Process
To develop the currency calculation script and validate the value property
please perform the following test steps:
BEFORE...
AFTER...
# # Recording by eValid(TM) # Copyright 2000-2012 by Software Research, Inc. # Recording made on: Microsoft Windows XP (IE 6.0), HostName "bulgaria" # ProjectID "Temp" GroupID "mysuite" TestID "7-dom-obj" LogID "AUTO" ScreenSize 1280 1024 FontSize 1 DeleteCache DeleteCookies InitLink "http://www.x-rates.com/" Wait 3979 FollowLink 0 67 "Currency Calculator" "http://www.x-rates.com/calculator.html" "" Wait 6466 InputValue 0 248 "TEXT" "" "inV" "30000" "" "" Wait 151 ButtonClick 0 251 "" "Calculate" "Calculate" "" Wait 7200 InputValue 0 190 "SELECT-ONE" "" "from" "Euro" "7" "" Wait 1152 ButtonClick 0 251 "" "Calculate" "Calculate" "" #SyncOnSelectedObjProperty 0 182 "value" " 43,617.0 USD" "name" "outV" "" SyncOnElementProperty 0 "name" "outV" "" #Originally recorded value - PASS... ValidateSelectedObjProperty 0 182 "value" " 43,617.0 USD" "name" "outV" "" #Validations will likely fail due to daily rate changes, thus save the current rate... IndexSet 0 IndexFindElement 0 DOWN "name" "outV" "" ValueGetElement 0 "value" "" ValueSave "CurrentRate.txt" #Manual Edit value - FAIL... #ValidateSelectedObjProperty 0 182 "value" " 39,508.0 USD" "name" "outV" "" # End of script. |