|
Summary
This page shows an example of eValid DOM-based index motion scripting
that handles automated playback of the
ICEfaces Autocompleter example.
Key points of this demonstration script are the following:
Screen Shots
These screen shots correspond
to various stages of the playback of the script.
Complete Script
Here is the script that was created for this AJAX synchronzation and index/motion command
illustration.
# Recording by eValid V9 Build #288, Build Date: (May 16 2009) # Copyright © 2009 by Software Research, Inc. # Recording made on: Microsoft Windows Vista Service Pack 1 (IE 7.0.6001.18000) ProjectID "Project" GroupID "ice" TestID "face" LogID "AUTO" ScreenSize 1440 900 FontSize 0 DeleteCache DeleteCookies # *** Step 1: Navigate, with synchronizattion, to the starting page... InitLink "http://www.icefaces.org/main/home/" # Allow a brief interval for page download to settle... Delay 100 SyncOnElementProperty 0 "nameProp" "services" "" SyncOnElementProperty 0 "id" "welcomeImage" "" SyncOnElementProperty 0 "readyState" "complete" "" FollowLink 0 398 "Component Showcase" "http://component-showcase.icefaces.org/" "" SubFrameSet 1 "Autocomplete" SyncOnElementProperty 1 "innerText" "Powered By ICEfaces" "" ElementFocus 1 78 "navigationMenuForm:navPnlSrs:1:tree:n-0-0:navNodeLink" "Autocomplete" "" # *** Step 2: Having arrived in the right place, now get everything # ready for the initial input... # A NO_NAV tag added to suppress page complete due to JavaScript... FollowLink 1 78 "Autocomplete" "javascript:;" "" NO_NAV # Synchronize to confirm that the page has arrived completely... SyncOnText 1 "SelectInputText using" "" ElementBlur 1 78 "navigationMenuForm:navPnlSrs:1:tree:n-0-0:navNodeLink" "Autocomplete" "" ElementFocus 1 78 "navigationMenuForm:navPnlSrs:1:tree:n-0-0:navNodeLink" "Autocomplete" "" # A NO_NAV tag added to suppress page complete due to JavaScript... FollowLink 1 78 "Autocomplete" "javascript:;" "" NO_NAV ElementDblClick 1 78 86 133 "navigationMenuForm:navPnlSrs:1:tree:n-0-0:navNodeLink" "Autocomplete" "" SyncOnText 1 "SelectInputText using" "" SyncOnText 1 "Powered By" "" ElementBlur 1 78 "navigationMenuForm:navPnlSrs:1:tree:n-0-0:navNodeLink" "Autocomplete" "" # Find the 1st pulldown section in the DOM... IndexSet 0 IndexFindElement 1 DOWN "id" "iceform:icepnltabset:0:AutoCmpTxt" "" IndexInputValue 1 "TEXT" "a" "" "" SyncOnElementProperty 1 "id" "iceform:icepnltabset:0:AutoCmpTxt_div" "" SyncOnElementProperty 1 "zIndex" "2" "" IndexFindElement 1 DOWN "tagName" "DIV" "" IndexFindElement 1 DOWN "innerText" "Abbotsford" "" IndexFindElement 1 DOWN "autocompleteIndex" "3" "" IndexElementClick 1 "" # *** Step 3: Now wait until the server generates the "Abbotsford" response... # Added sync/validation point... ElementFocus 1 321 "iceform:icepnltabset:0:AutoCmpTxtFace" "" "" Delay 1000 ElementBlur 1 321 "iceform:icepnltabset:0:AutoCmpTxtFace" "" "" Delay 1000 SyncOnText 1 "Server-side Backing Bean Values: City:Abbotsford" "" # Find the 2nd pulldown section in the DOM... IndexSet 0 IndexFindElement 1 DOWN "id" "iceform:icepnltabset:0:AutoCmpTxtFace" "" IndexInputValue 1 "TEXT" "a" "" "" SyncOnElementProperty 1 "tagName" "TR" "" SyncOnElementProperty 1 "className" "icePnlGrp exampleBox firstChildTitle selectInputTextContainer" "" SyncOnText 1 "Abie" "" SyncOnElementProperty 1 "id" "iceform:icepnltabset:0:AutoCmpTxtFace_div" "" SyncOnElementProperty 1 "zIndex" "2" "" # *** Step 4: Finally, locate and navigate to the "AbieNebraksa68001" selection... IndexFindElement 1 DOWN "tagName" "SPAN" "" IndexFindElement 1 DOWN "tagName" "DIV" "" SyncOnElementProperty 1 "innerText" "AbieNebraska68001" "" IndexFindElement 1 DOWN "innerText" "AbieNebraska68001" "" IndexElementMouseDown 1 "" IndexElementClick 1 "" # Added sync/validation point... ElementFocus 1 321 "iceform:icepnltabset:0:AutoCmpTxtFace" "" "" Delay 1000 ElementBlur 1 321 "iceform:icepnltabset:0:AutoCmpTxtFace" "" "" Delay 1000 SyncOnText 1 "Server-side Backing Bean Values: City:Abie" "" # End of Script
To download this script into your eValid script window click here: face.evs