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 -- IndexElementEvent-- Command Explanation
eValid Home

Summary
This page describes eValid's IndexElementEvent command and explains its role and use.

Background
Once a particular HTML element is identified by its DOM index -- the local sourceIndex that is found by one of the DOM manipulation commands -- this command permits the user to fire an event at that particular index.

Command Description
Here is the IndexFindElementEx command description and explanation.

KEY COMMAND SYNTAX:
Name(...)
ORIGIN EXPLANATION COMMENTS
PAGEMAP IndexElementEvent wid "event_name" "property_name" "property_value"
[ "property_name" "property_value" ] ... "frame_path" [NAV]
Edit This command involves specifying an event_name and a sequence of "property_name" "property_value" in pairs.

Complete details on how these parameters work are given below.

No adaptive playback activity is performed.

Use the PageMap to identify index values and attribute names.

Command Explanation

  1. Command Pairs
    The [ "string" "string" ] ... notation means that you can have as many pairs as you wish. The following syntax examples are correct:

    1. IndexElementEvent wid "event_name" "property_name" "property_value" "frame_path"

    2. IndexElementEvent wid "event_name" "property_name" "property_value" "property_name" "property_value" "frame_path" NAV

    3. IndexElementEvent wid "event_name" "property_name" "property_value" "property_name" "property_value" "property_name" "property_value" "property_name" "property_value" "frame_path"

    The following syntax examples are invalid:

    1. IndexElementEvent wid "event_name" "frame_path"

    2. IndexElementEvent wid "event_name" "frame_path" NAV

    The example below is valid syntactically, but it may produce playback errors:

    1. IndexElementEvent wid "event_name" "property_name" "frame_path" NAV

    That's because it has 5 parameters, which follows the form of the first valid syntax example above. However, in this case eValid will assume "frame_path" is a property value and "NAV' as the required frame_path value.

  2. Parameters
    The main parameters of this command are the name of the event and the descriptions of the actions to take. Actions are described in name = value pairs, of which there can be any number (as indicated by the [ ] ... notation in the command definition). Here are the specifics:

    1. Event Name:
      The event_name, which can be taken from the following list, specifies the kind of event that is to occur:
      onabort, onblur, onchange, onclick, ondblclick,
      onerror, onfocus, onkeydown, onkeypress, onkeyup, onload,
      onmousedown, onmousemove, onmouseout, onmouseover, onmouseup,
      onresend, onresize, onselect, onsubmit, onunload

      Note that there could be other events that could be used here, depending on how the page is constructed. The above list is only a suggestion and may not be complete.

    2. Action Description:
      The action(s) to be taken are specified in terms of a pair (or set of pairs) of these two parameters:
      "property_name" "property_value"

      These values may ONLY occur in pairs and can be ONLY taken from the following combinations and options. The values given below are the exact ones to use. All values are case-sensitive. Any other combinations and options, including empty strings, are ignored without issuance of WARNINGs or ERRORs during playback.

      property_name property_value Explanation
      altKey Possible values are:
      • true -- ALT key is not pressed
      • false -- ALT key is pressed
      Sets the state of the ALT key when given these values:
      button Possible values are:
      • 0 -- No button is pressed.
      • 1 -- Left button is pressed.
      • 2 -- Right button is pressed.
      • 3 -- Left and right buttons are both pressed.
      • 4 -- Middle button is pressed.
      • 5 -- Left and middle buttons both are pressed.
      • 6 -- Right and middle buttons are both pressed.
      • 7 -- All three buttons are pressed.
      Sets the mouse button pressed by the user.
      cancelBubble Possible values for this are the following:
      • false -- Bubbling is enabled. The next event handler in the hierarchy will receive the event.
      • true -- Bubbling is disabled. The next event handler in the hierarchy will NOT receive the event.
      Sets whether the current event should bubble up the hierarchy of event handlers.
      clientX, clientY   Sets the x-coordinate or y-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and cross bars. The value is a long integer expressed in pixels.
      ctrlKey Possible values are:
      • true -- CTRL key is not pressed
      • false -- CTRL key is pressed.
      Sets the state of the CTRL key.
      ctrlLeft Possible values are:
      • true -- Left CTRL key is not pressed
      • false -- Left CTRL key is pressed.
      Sets the state of the left CTRL key.
      keyCode   Sets the Unicode key code associated with the key that caused the event. The property value parameter is a number. It is 0 if no key caused the event.
      offsetX, offsetY   Sets the x-coordinate or y-coordinate of the mouse pointer's position relative to the object firing the event. The value is a long integer expressed in pixels.
      propertyName   Sets the name of the property that changes on the objects.
      qualifier   Sets the name of the data member provided by a data source object.
      reason Possible values are these:
      • 0 -- Data transmitted successfully
      • 1 -- Data transfer aborted.
      • 2 -- Data transferred in error.
      Sets the result of the data transfer for a data source object.
      repeat Possible values are these:
      • true -- event fires two or more times.
      • false -- event fires once.
      Sets whether the onkeydown event is being repeated.
      returnValue Possible values for this are:
      • "true"
      • "false"
      Sets the return value from the event.
      screenX, screenY   Sets the x-coordinate or y-coordinate of the mouse pointer's position relative to the user's screen. The value supplied is a long integer expressed in pixels.
      shiftKey Possible values that can be used are:
      • true -- SHIFT key is not pressed
      • false -- SHIFT key is pressed.
      Sets the state of the SHIFT key.
      srcUrn Possible values that can be used are:
      • NULL -- default only, cannot be changed.

      This property is set to NULL unless both of the following conditions are true:

      • A behavior currently is attached to the element on which the event is fired.
      • The behavior defined in the preceding bullet has specified a URN identifier and fired the event.
      Sets the Uniform Resource Name (URN) of the behavior that fired the event.
      x, y   Sets the x-coordinate, or y-coordinate, in pixels, of the mouse pointer's position relative to a relatively positioned parent element. The value is a long integer.

Command Examples
Some sample commands are the following:

  1. Sends a mouse down event to the sourceIndex:
    IndexElementEvent 0 "onmousedown" "" "" ""
  2. Sends a mouse up event to the sourceIndex:
    IndexElementEvent 0 "onmouseup" "" "" ""
  3. Sends an onclick event event to the sourceIndex, with the specified X and Y pixel offsets within the DOM element, and expect a navigation to result from this action:
    IndexElementEvent 0 "onclick" "offsetX" "357" "offsetY" "215" "" NAV
  4. Knowing that sourceIndex points at an element that is sensitive to mousedown and mouseup events, but not to mouse clicks, this pair sends a mousedown followed by a mouse up, to the left button, expecting a NAV on the second event:
    IndexElementEvent 0 "onmousedown" "button" "1" ""
    IndexElementEvent 0 "onmouseup" "button" "1" "" NAV
  5. Here is a sequence that replaces a recorded TabKey 0 command with a pure-DOM version:
    IndexElementEvent 0 "onkeydown" "keyCode" "9" "number:0"
    IndexElementEvent 0 "onkeyup" "keyCode" "9" "number:0"

Additional Notes

  1. This command silently ignores arguments that do not make sense relative to the current value of the sourceIndex.