|
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.
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" "" ... |