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

eValid -- Structural Testing With DOM Commands -- HTML Push Button on a FORM
eValid Home

Background
The eValid DOM index/motion algorithmic/structural testing capability makes it possible to produce robust tests which behave independently of page specifics.

Use of the DOM Manipulation Resources leads to tests that are able to operate at a level of abstraction above that of the usual eValid command level. This example is one of a series that illustrates how this process works. Please see the Guide To Examples for the complete set.

Description of Tested Feature
This example inputs text fields and clicks a button on a form. The passage may be different if the navigation is performed via a JavaScript passage.

Index/Motion Command Sequence
Here is the command sequence that achieves the result:

...
IndexSet 0
IndexFindElement wid DOWN "value" "Reset"
IndexFollowLink wid "" NO_NAV
...

eValid Script
Here is the eValid script that is an actual instance of this action.

# Recording by eValid V9 
# Copyright 2012 by Software Research, Inc. 
# Recording made on: Microsoft Windows XP Service Pack 3 (IE 7.0.5730.13)

ProjectID "Project"
GroupID "Test"
TestID "example02"
LogID "AUTO"

DeleteCache
DeleteCookies

InitLink "http://www.quirksmode.org/js/formex.html"
Wait 1191
InputValue 0 61 "TEXT" "" "name" "Jane" "" ""
Wait 1232
InputValue 0 65 "TEXT" "" "address" "elm" "" ""
Wait 1281
InputValue 0 69 "TEXT" "" "City" "SF" "" ""
Wait 110

# Recorded command...
#------------------------------------------------------------------------
ResetClick 0 107 "" "" "Reset" ""
#------------------------------------------------------------------------


InitLink "http://www.quirksmode.org/js/formex.html"
Wait 1191
InputValue 0 61 "TEXT" "" "name" "Jane" "" ""
Wait 1232
InputValue 0 65 "TEXT" "" "address" "elm" "" ""
Wait 1281
InputValue 0 69 "TEXT" "" "City" "SF" "" ""
Wait 110

# Structural command equivalent...
#------------------------------------------------------------------------
IndexSet 0
IndexFindElement 0 DOWN "value" "Reset" ""
IndexFollowLink 0 "" NO_NAV
#------------------------------------------------------------------------

# End of Script.

Download example02.evs

How It Works
Here the example fills-in three TEXT fields and then clicks the "Reset" button.