Your e-Business Quality Partner eValid™ -- The Web Quality Suite
Browser-Based Client-Side Functional Testing and Validation Page Timing/Tuning Transaction Monitoring. WebSite Spidering & Analysis and Realistic Server Loading.

eValid -- Triple Sync in Structural Test -- Script Fragment
eValid Home

Summary
In some cases it is necessary to apply multiple synchronization steps to assure reliability of structural test playback. The script below illustrates how multiple-sync steps are interconnected to structural test script passages.

Original "from life" recorded commands are shown commented out in the script passage below. All synchronization commands used in the script are shown in color.

# Recording by eValid V9 Build #306
# Copyright (c) 2011 by Software Research, Inc. 

ProjectID "Project"
GroupID "Group"
TestID "Fratmeng"
LogID "AUTO"

FontSize 0
DeleteCache
DeleteCookies

EnvironmentVariableFile "input.txt"

# ------------------------------------------------------------------------------
# (0) Ensure user is logged out
# ------------------------------------------------------------------------------
InitLink "https://$URL/next/Login.aspx?un=$USER&pwd=$PASS&cmd=logout"
SyncOnElementProperty 0 "id" "usernameBox" ""

# ------------------------------------------------------------------------------
# (1) Navigate to the application starting page and log in with supplied user 
#     account name and password.
# ------------------------------------------------------------------------------
GotoLinkSubmit 0 "https://$URL/next/" ""

SyncOnElementProperty 0 "id" "UserName" ""
ResetTimer

# ------------------------------------------------------------------------------
# InputValue 0 47 "TEXT" "UserName" "UserName" "$USER" "" ""
IndexSet 0
IndexFindElement 0 DOWN "id" "UserName" ""
IndexInputValue 0 "TEXT" "$USER" "" ""
Wait 2000

# ------------------------------------------------------------------------------
# InputValue 0 52 "TEXT" "Password" "Password" "$PASS" "" ""
IndexSet 0
IndexFindElement 0 DOWN "id" "Password" ""
IndexInputValue 0 "TEXT" "$PASS" "" ""
Wait 2000
# ------------------------------------------------------------------------------
# InputImageClick 0 73 "https://$URL/images/login.gif" "" "number:0"
IndexSet 0
IndexFindElement 0 DOWN "id" "Button_Login" ""
IndexFollowLink 0 ""
SyncNotOnElementProperty 0 "id" "WaitMessage" ""
SyncOnText 0 "Input Data" "" 
Wait 2000

# ------------------------------------------------------------------------------
# (2) Navigate to the "Input Data" TAB area...
# ------------------------------------------------------------------------------
# 
# FollowLink 0 76 "Input Data" "https://$URL/next/InputSite.aspx" ""
IndexSet 0
IndexFindElement 0 DOWN "id" "InputSite" ""
IndexFollowLink 0 ""

# ------------------------------------------------------------------------------
# ADDED Sync on element property (picked with PageMap).
SyncOnText 0 "Displayed Inventory" ""
SyncOnElementProperty 0 "innerText" "Click here for a List" "number:1"
SyncOnElementProperty 0 "id" "btnEditProducts" "number:1"

# ------------------------------------------------------------------------------
# (3) Click on the "Products" TAB area and then click to reveal the 
#     "Imports" section...
# ------------------------------------------------------------------------------
IndexSet 0
IndexFindElement 0 DOWN "id" "Products" ""
IndexElementClick 0 ""
SyncOnElementProperty 0 "id" "Imports" ""

# ------------------------------------------------------------------------------
IndexSet 0
IndexFindElement 0 DOWN "id" "Imports" ""
IndexFollowLink 0 ""
SyncOnText 0 "Imports" "number:1"
SyncOnElementProperty 0 "id" "Inventory Timeline" "number:1"
Wait 2000

# ------------------------------------------------------------------------------
# (4) Select "Jan 2011 to Jan 2011" in Select Date Range...
# ------------------------------------------------------------------------------

InputValue 0 92 "SELECT-ONE" "Month" "Month" "Jan" "1" "number:1"
Wait 1000
InputValue 0 106 "SELECT-ONE" "Year" "Year" "2011" "1" "number:1"
Wait 1000
InputValue 0 152 "SELECT-ONE" "EndMonth" "EndMonth" "Jan" "1" "number:1"
Wait 1000
InputValue 0 166 "SELECT-ONE" "EndYear" "EndYear" "2011" "1" "number:1"

# ------------------------------------------------------------------------------
# (5) Locate the Logout button and click on it...
# ------------------------------------------------------------------------------
#
# FollowLink 0 68 "Logout" "javascript:Logout(true);" ""
IndexSet 0
IndexFindElement 0 DOWN "innerText" "Logout" ""
IndexFollowLink 0 ""
Wait 5631

# ------------------------------------------------------------------------------
ElapsedTime "[Timing Report]"
SaveRecord Timing.txt "$_Host; Date %T; UName $USER; Event \t%f"
...