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 -- Recording Autosuggest Text Boxes
eValid Home

Synopsis
Many applications now include AJAX-implemented autosuggest functions. A good example of this is the basic Google Search Function, which uses an AJAX capability to interrogate Google databases and make suggestions on a likely search target based on keyword matches found on their server.

"Out Of Box "Recording Method
To record an AJAX autosuggest text entry "out of the box" you can use these simple steps.

Before you start, please make sure that the text entry box you are working with does have the true AJAX-based autosuggest type of behavior (look at the last picture below). If you DON'T see that kind of drop-down menu then you should just record this text box in the regular way -- no special tricks like the recording protocol described here would be needed.

  1. Navigate to the starting page, the one that has the AJAX autosuggest text box implementation.
  2. Type in a few starting characters and wait for the autosuggest function to elaborate them. In this example we've typed in "zzzz".

  3. Press TAB to instruct eValid to record the input recorded thusfar. You'll see eValid respond by putting an InputValue command into the script.

  4. Move the mouse over the text area and bring it in focus with a left-click.

  5. Use the Down Arrow key to have the box display all of the suggestions found thusfar. eValid responds by recording an ElementMouseDown on the selected option, and then an ElementClick to confirm your selection and start the navigation.

Completed Script
The final recorded script is shown here.

# Recording by eValid V9 
# Copyright (c) 2009 by Software Research, Inc. 
# Recording made on: Microsoft Windows Vista Service Pack 1 (IE 7.0.6001.18000)

ProjectID "Advanced.Testing"
GroupID "Autosuggest"
TestID "Test"
LogID "AUTO"

ScreenSize 1280 800
FontSize 0
DeleteCache
DeleteCookies
InitLink "http://www.google.com/"
Wait 6068
InputValue 0 60 "TEXT" "" "q" "zzzz" "" ""
Wait 5756
ElementMouseDown 0 86 "" " best company" ""
Wait 203
ElementClick 0 86 319 243 "" " best company" "" NAV
# Recording stopped.