Your e-Business Quality Partner eValid™ -- Automated Web Quality Solution
Browser-Based, Client-Side, Functional Testing & Validation,
Load & Performance Tuning, Page Timing, Website Analysis,
and Rich Internet Application Monitoring.

eValid -- eValid Programmatic Interface (EPI) Definitions
eValid Home

EPI Specifics
Supported Methods -- Type Declarations
  • All of the EPI Supported Commands behave in the EPI interface the same way they do in the eValid browser. (Click on the command to read the eValid script language definition.)
  • The individual parameters used in these commands have specific syntax requirements when used in the EPI, as described in the EPI Header File:
    • long day
    • long h
    • long hour
    • long idx
    • long key
    • long length
    • long minute
    • long month
    • long msecs
    • long number
    • long pos
    • long range
    • long step
    • long value
    • long wid
    • long x
    • long y
    • BSTR filename
    • BSTR frame_path
    • BSTR id
    • BSTR message
    • BSTR name
    • BSTR url
  • There are a few additional types that may be needed for some commands. The definitions in the header file should be used as the definative source.
Supported Methods in IEvalidLogCollection Interface
These commands give the EPI user direct access to information pertaining to the behavior of eValid in response to commands issued to it.
Function Name Explanation Notes
get_length( long * p )
item( long index, IEvalidLog ** p )
get_LastPlaybackLog( BSTR * log ) Retrieves the [multiple line] contents of the eValid Event Log that arose from completion of the last playback action. The last line of this item is always the "Command completed" line.
get_LastPlaybackLog( struct IEvalidLogCollection ** p ) Retrieves the [multiple line] contents of the eValid Event Log that arose from completion of the last playback action into the structure at struct. The last line of this item is always the "Command completed" line.
get_LastPlaybackStatus ( BSTR * log ) Retrieves the playback status for last completed command (a string such as OK, ERROR, TIMEOUT, MESSAGE, WARNING, etc.) into &pointer.  
Event Log Extraction Commands -- IEvalidLog Interface
(Presented in eValid Event Log Order)
These commands extract specific values from the current event log.
Function Name Explanation
get_date( BSTR * date ) Current date (YYYY/MM/DD).
get_time( BSTR * time ) Current time (HH:MM:SS).
get_seqNum( long * num ) Command sequence number
get_cmdNum( long * num ) Executed command number sequence.
get_lineNum( long * num ) Script line number.
get_projectName( BSTR * name ) Assigned project name
get_groupName( BSTR * name ) Assigned test group name.
get_testName( BSTR * name ) Assigned Test Name
get_status( BSTR * status ) Command status (OK, ERROR, etc.)
get_accumTime( long * time )Cumulative elapsed time since start of test.
get_fineTime( long * time ) Fine time (for sub-event).
get_message( BSTR * message ) Complete message text.
get_totalCmdTime( long * time ) Total command time.
DOM Manipulation Commands
These commands are used to read (e.g. loop through and inspect) and/or to set (insert values) in the current page's DOM.
Function Name Explanation Notes
get_NumElements(long wid, BSTR frame_path, long * value) For the page showing in window wid, relative to frame_path, puts the total DOM item count for that page in &numItems. Use this if you plan a loop that will spin through all of the elements on a particular page.
get_ElementAttribute(long wid, long idx, BSTR name, long value, BSTR frame_path, BSTR *value) For the page showing in window wid, relative to frame_path, for the property name, returns the value of the property in &elementValue. Use this to extract the value of a DOM element property value when you know its location and name.
put_ElementAttribute(long wid, long idx, BSTR name, long value, BSTR frame_path)

put_ElementAttribute(long wid, long idx, BSTR name, BSTR value, BSTR frame_path)

put_ElementAttribute(long wid, long idx, BSTR name, VARIANT_BOOL value, BSTR frame_path)

For the page showing in window wid, relative to frame_path, for the property name, adjusts the DOM so that it has the spcified elementValue. Be careful to choose the right type for the value, string, or boolean you are inserting.
Error Processing
This section describes how the EPI handles HRESULT values.
Methods invoked via the EPI all return S_OK if there were no problems instructing eValid to run said script command.

Note that just because EPI returns S_OK doesn't mean the playback had no errors, or there was no syntax error.

For methods with a parameter that requires a pointer (not the optional ones), and if the pointer specified is NULL, then the method returns E_POINTER. This applies, for examples, to methods like:

- get_LastPlaybackStatus
- get_LastPlaybackLog

Some methods return E_FAIL in various circumstances:

- get_LastPlaybackStatus -- only when no status is available (likely to be rare)
- get_LastPlaybackLog -- only when no playback log is available (likely to be rare)
- any script command method -- when the EPI could not get eValid to run the script command. This includes being unable to spawn an eValid process.

The call to CoCreateInstance (used to create an IEvalid object) will return S_OK if successful. Otherwise it will return:

- E_ACCESSDENIED -- No valid EPI license key found
- E_OUTOFMEMORY -- Could not instantiate the object (assuming out of memory here)