Saturday, August 9, 2008

EPI C++ Example Programs

We have developed some simple examples that show off how eValid's Programmatic Interface (EPI) works.

Example #1: This very short example involves just a few evalid commands, an InitLink and a GotoLink. It's main purpose is to illustrate how the EPI interface is structured from the programmers' point of view. You can see both the CPP program and the corresponding non-EPI eValid script for comparison.

Example #2: Similar to the above, this example also is 1:1 with a corresponding eValid script. This script involves running an IndexFind command that identifies [to an internal variable] a particular field. The same command in the EPI interface performs the same way but in this case the actual index value is returned into the CPP program. That index is available to be used for other purposes in the CPP code.

Example #3: Here is a CPP program that performs a particular kind of search that can only be done easily with regular eValid command sequences of some complexity. The program uses a search engine to search for a particular search term, and then computes [by iterating and counting] the first search-results page that includes both the searched-for string and a target URL.

Example #4: Here there is a regular recorded eValid script that does a number of different kinds of things, and the EPI CPP program which duplicates the script actions exactly.

Example #5: The program in this example does not have a direct eValid script equivalent. The program navigates to a user-specified URL and then, within that page, finds the specific index of the [first] element in that page for which a specified attribute NAME has a specified VALUE. This read is done from the DOM of the page as it currently exists, which may or may not be what was sent down from the server, depending on what kind of AJAX-type operations were performed on it.

Example #6: The program in this example does not have a direct eValid script equivalent. Similar to Example #5, this program changes the value of attribute NAME at a specified index on the page to the specified VALUE. This update action is done to the DOM of the page as it currently exists, without permission of the browser or the server. This is a powerful feature and user caution is advised.

The bottom line for this set of examples is this: EPI for C++/CPP is available today and lets you do tests in an efficient and powerful way.

No comments: