Your e-Business Quality Partner eValid™ -- Automated Web Quality Solution
Browser-Based, Client-Side, Functional Testing & Validation,
Load & Performance Tuning, Page Timing, Website Analysis,
and Rich Internet Application Monitoring.

eValid -- Google Finance AutoCompletion Demonstration Script
eValid Home

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.

  1. Initial Page Navigation
    The script navigates to the Google Finance starting page and waits to confirm that the search box is present.

  2. Enter Search Terms
    Enter in the search term "bh" in the search box area.

  3. Wait for Autocomplete Suggestions
    Now, wait for the associated web support server to provide suggested autocomplete suggestions in a drop down box.

  4. Make Selection and Wait for Navigation
    The drop down box shows a variety of suggestions, and the script finds the one corresponding to "BLT" and selects it, and then waits for the navigation to the chosen page to complete.

    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