|
Example Program #01
This is a very simple EPI program that illustrates the basic
operation of the interface.
The program navigates to an initial URL, waits for 10 seconds,
and then navigates to a second URL, and then exits.
#include "stdafx.h" #include "epi.h" int main() { ::CoInitialize( NULL ); { CComPtr< IEvalid > pEvalid; if( SUCCEEDED( CoCreateInstance( CLSID_Evalid, NULL, CLSCTX_INPROC_SERVER, IID_IEvalid, ( void** )&pEvalid ) ) ) { CComBSTR bstr_Url( _T( "http://www.google.com" ) ); pEvalid->InitLink( bstr_Url ); pEvalid->Wait( 5000 ); pEvalid->GotoLink( 0, CComBSTR( _T( "http://www.amazon.com" ) ), CComBSTR( _T( "" ) ) ); pEvalid->Wait( 5000 ); pEvalid->ExitNow(); } } ::CoUninitialize(); return 0; } |
Resources
Corresponding eValid Script
Here is the corresponding eValid recorded script.
# Copyright (c) 2011 by Software Research, Inc. # Recording made on: Microsoft Windows XP Service Pack 2 # Recording started. ProjectID "FunctionalTests" GroupID "Experimental" TestID "example01" LogID "AUTO" ScreenSize 1280 1024 FontSize 0 DeleteCache DeleteCookies InitLink "http://www.google.com/" Wait 5000 GotoLink 0 "http://www.amazon.com/" "" Wait 5000 # Recording stopped. |