|
Summary
This page shows an example of eValid DOM-based index motion scripting
that handles automated playback of the Google Finance "Get Quotes" window.
This page uses AJAX to provide a sophisticated autocomplete function that without special
treatment will not necessarily behave correctly.
Key points of this demonstration script are the following:
Screen Shots
These screen shots correspond to various stages of the playback of the
script.
Note that if "BLT" dose not appear as one of the suggested possibilities, eValid would be unable to find BLT in the DOM and an error would result. At the same time, the same script would search for any desired text in the dynamically generated drop down list, regardless of position changes of the target selection within the list. (In other words, the playback would be independent of the order of presentation).
Complete Script
Here is the script that was created for this AJAX synchronzatino and index/motion command
illustration.
# eValid V9 # Copyright 2000-2012 by Software Research, Inc. ProjectID "Project" GroupID "Group" TestID "finance" LogID "AUTO" ScreenSize 1440 900 FontSize 0 DeleteCache DeleteCookies InitLink "about:blank" Delay 1000 # Point 1: Go to starting page... GotoLink 0 "http://www.google.com/finance" "" "" SyncOnElementProperty 0 "id" "searchbox" "" # Point 2: Enter "bh" in the search box... IndexSet 0 IndexFindElement 0 DOWN "id" "searchbox" "" IndexInputValue 0 "TEXT" "bh" "" "" # Point 3: Wait for the autocompleter server to provide options... SyncOnElementProperty 0 "id" "ac-list" "" SyncOnElementProperty 0 "zIndex" "0" "" SyncOnElementProperty 0 "inflateBlock" "true" "" # Point 4: The options are available, find and choose "BLT"... IndexFindElement 0 DOWN "id" "ac-list" "" IndexFindElement 0 DOWN "tagName" "DIV" "" IndexFindElement 0 DOWN "tagName" "SPAN" "" IndexFindElement 0 DOWN "innerText" "BLT" "" IndexElementMouseDown 0 "" SyncOnText 0 "Billiton" "" SyncOnText 0 "Key Stats & Ratios" "" SyncOnText 0 "Officers and directors" "" # End of Script
To download this script into your eValid script window click here: finance.evs