Your e-Business Quality Partner eValid™ -- The Web Quality Suite
Browser-Based Client-Side Functional Testing and Validation Page Timing/Tuning Transaction Monitoring. WebSite Spidering & Analysis and Realistic Server Loading.

eValid -- DOM Value Manipulation -- Command Description
eValid Home

Introduction
The basic idea of these commands is to make it possible to have playback sequences that involve manipulation of specific valudes of DOM elements.

You can study the DOM in the current page through use of the eValid PageMap utility. This command group is similar to the DOM Element Manipulation/Motion commands.

ValueSet   ValueGetElement   ValuePutElement  

DOM Element Value Extraction/Insertion Commands
 

Working Assumptions About These Commands:
  • There is only one elementValue known to eValid at any time.
  • The elementValue is always a string.
  • The initial value of the elementValue is always set to empty.
  • The value of the elementValue persists between pages, as long as the current playback is running.
  • Commands that use this [internally stored] elementValue value always refer to the current page.
  • eValid does not modify the elementValue except by action of the commands below.
KEY COMMAND SYNTAX:
Name(...)
ORIGIN EXPLANATION COMMENTS
PAGEMAP ValueSet value Edit Sets the elementValue to the specified value. The initial elementValue is blank.
PAGEMAP ValueGetElement wid name "frame_path" Edit Gets the value of the named element at sourceIndex and saves it in elementValue.

Details of the available names are usually found using the eValid PageMap facility.

If the object found at sourceIndex does not have the given name, or if name is correct and the value the name currently has is incorrect, or if name is not found, an ERROR results.

 
PAGEMAP ValuePutElement wid name "frame_path" Edit Inserts the current elementValue into the specific attribute of the described DOM object in the indicated frame (as specified by the frame_path).

Details of the available names are usually found using the eValid PageMap facility.

 

Example Usages
Here is some typical eValid command sequences that illustrate the process for DOM-based element value extraction and manipulation:

  ...
  #
  # (1) Make the id value of a page element blank...
  #
  ValueSet "MyNewValueForTheNamedProperty"
  IndexFindElement ... find some sourceIndex for 
	which we need to set the id property...
  ValuePutElement 0 "id" ""
  #
  # (2) Change the URL on an anchor tag in a page, on the fly...
  #
  IndexFindElementEX (rest of parameters)
  # ... locates the element with the required 
	URL fragment.
  ValueSet "http://www.cnn.com" ""
  ValuePutElement 0 "innerHTML"
  #
  # (3) Pick up a page-internal value from one place and put in another...
  #
  IndexFindElement ... locate the source element you want.
  ValueGetElement 0 "name" ""
  IndexMove ((number of positions to move))
  IndexFindElement ... locate the destination element.
  ValuePutElement 0 "name" ""
  #
  # (4) Validate that a particular element value has an expected value
  #     stored in an external file...
  #
  IndexFindElement ... locate the source element you want.
  ValueGetElement 0 "name" ""
  ValueSave "actual-data-filename" 
  CompareStrings "actual-data-filename" "required-data-filename"
  #
  # (5) Validate that a particular element value has an expected value
  #     stored in the current script...
  #
  IndexFindElement ... locate the source element you want to analyze.
  IndexValidateObjProperty 0 "PropertyName" "ExpectedValue" ""
  ...