|
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.
© Copyright 2000-2008 by Software Research, Inc.
|
|
eValid -- IndexElementEvent-- Detailed 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.
This command is part of the
DOM Element Manipulation/Motion command set.
| 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
- Command Pairs
The [ "string" "string" ] ... notation means that
you can have as many pairs as you wish.
The following syntax examples are correct:
- IndexElementEvent wid "event_name" "property_name" "property_value"
"frame_path"
- IndexElementEvent wid "event_name" "property_name" "property_value"
"property_name" "property_value" "frame_path" NAV
- 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:
- IndexElementEvent wid "event_name" "frame_path"
- IndexElementEvent wid "event_name" "frame_path" NAV
The example below is valid syntactically,
but may produce playback errors:
- IndexElementEvent wid "event_name" "property_name" "frame_path" NAV
That's because it has 5 parameters, which follow the form of the first
valid syntax example above. eValid will assume "frame_path" is a property
value and "NAV' as the frame_path.
-
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:
- Event Name:
The event_name,
which can be taken
from the following list,
specifies the kind of event that is to be fired:
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.
- Action Description:
The action(s) to be taken are specified in terms of
a pair of 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 shown are case-sensitive.
All other combinations and options,
including empty strings,
are ignored without issuance of Warnings or Errors during playback.
- altKey -- sets the state of the ALT key:
- true - ALT key is not pressed
- false - ALT key is pressed
- button -- sets the mouse button pressed by the user.
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.
- 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 --
sets state of the CTRL key.
Possible values are:
- true - CTRL key is not pressed
- false - CTRL key is pressed.
- ctrlLeft
-- sets state of the left CTRL key. Possible values are:
- true - Left CTRL key is not pressed
- false - Left CTRL key is pressed.
- 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 -- sets
the result of the data transfer for a data source object.
Possible values:
- 0 - Data transmitted successfully
- 1 - Data transfer aborted.
- 2 - Data transferred in error.
- repeat --
sets whether the onkeydown event is being repeated.
Possible values are:
- true - event fires two or more times.
- false - event fires once.
- screenX, screenY --
sets the x-coordinate or y-coordinate of the mouse pointer's position
relative to the user's screen.
The value is a long integer expressed in pixels.
- shiftKey --
sets the state of the SHIFT key.
Possible values are:
- true - SHIFT key is not pressed
- false - SHIFT key is pressed.
- srcUrn --
sets the Uniform Resource Name (URN) of the behavior that fired the event.
Possible values 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.
- 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.
- cancelBubble --
set whether the current event should bubble up the hierarchy of
event handlers.
Possible values are:
- "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.
- 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.
- returnValue --
sets the return value from the event.
valid property values: "true" and "false"
Command Examples
Some sample commands are the following:
- Sends a mouse down event to the sourceIndex:
IndexElementEvent 0 "onmousedown" "" "" ""
- Sends a mouse up event to the sourceIndex:
IndexElementEvent 0 "onmouseup" "" "" ""
- 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
- 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