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 -- Third Item in Dropdown List
eValid Home

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 illustrate how this process works. Please see the Guide To Examples for the complete set.

Description of Tested Feature
This example navigates to an example form and manipulates a dropdown list. 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 "name" "value" "" 
IndexInputValue wid "SELECT-ONE" "text on label" "3" "" 

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

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

ProjectID "Project"
GroupID "Test"
TestID "example08"

InitLink ""
Wait 1714

# Recorded command...
InputValue 0 87 "SELECT-ONE" "" "refer" "Through NetlinQ" "3" ""

InitLink ""
Wait 1714

# Structural command equivalent...
IndexSet 0
IndexFindElement 0 DOWN "name" "refer" ""
IndexInputValue 0 "SELECT-ONE" "Through NetlinQ" "3" ""

# End of script.

Download example08.evs

How It Works
Such a list is basically like an indented HTML list, so the "3" above says to click on the 3rd one in the list.