<head></head><body><pre></font><font color="#ff0000"><i>################################################################################</font></i><font color=black>
</font><font color="#ff0000"><i># TEST:	drv1</font></i><font color=black>
</font><font color="#ff0000"><i>################################################################################</font></i><font color=black>
</font><font color="#ff0000"><i># Copyright (C) 2000  EMOS Computer Consulting GmbH</font></i><font color=black>
</font><font color="#ff0000"><i>#</font></i><font color=black>
</font><font color="#ff0000"><i># This test is free software; you can redistribute it and/or</font></i><font color=black>
</font><font color="#ff0000"><i># modify it under the terms of the GNU Lesser General Public</font></i><font color=black>
</font><font color="#ff0000"><i># License as published by the Free Software Foundation; either</font></i><font color=black>
</font><font color="#ff0000"><i># version 2.1 of the License, or (at your option) any later version.</font></i><font color=black>
</font><font color="#ff0000"><i>#</font></i><font color=black>
</font><font color="#ff0000"><i># This test is distributed in the hope that it will be useful,</font></i><font color=black>
</font><font color="#ff0000"><i># but WITHOUT ANY WARRANTY; without even the implied warranty of</font></i><font color=black>
</font><font color="#ff0000"><i># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</font></i><font color=black>
</font><font color="#ff0000"><i># Lesser General Public License for more details.</font></i><font color=black>
</font><font color="#ff0000"><i>#</font></i><font color=black>
</font><font color="#ff0000"><i># You should have received a copy of the GNU Lesser General Public</font></i><font color=black>
</font><font color="#ff0000"><i># License along with this test; if not, write to the Free Software</font></i><font color=black>
</font><font color="#ff0000"><i># Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</font></i><font color=black>
</font><font color="#ff0000"><i>#</font></i><font color=black>
</font><font color="#ff0000"><i># For further information please contact:</font></i><font color=black>
</font><font color="#ff0000"><i>#</font></i><font color=black>
</font><font color="#ff0000"><i>#	Dean Rajovic</font></i><font color=black>
</font><font color="#ff0000"><i>#	EMOS Computer Consulting GmbH</font></i><font color=black>
</font><font color="#ff0000"><i>#	Oskar-Messter-Straße 25</font></i><font color=black>
</font><font color="#ff0000"><i>#	85737 Ismaning</font></i><font color=black>
</font><font color="#ff0000"><i>#	Germany</font></i><font color=black>
</font><font color="#ff0000"><i>#	tel.: +49 89 608 765-0</font></i><font color=black>
</font><font color="#ff0000"><i>#	mailto:drajovic@emos.de</font></i><font color=black>
</font><font color="#ff0000"><i>#	http://www.emos.de</font></i><font color=black>
</font><font color="#ff0000"><i>################################################################################</font></i><font color=black>
</font><font color="#ff0000"><i># $Revision: 1.4 $</font></i><font color=black>
</font><font color="#ff0000"><i># $Author: drajovic $</font></i><font color=black>
</font><font color="#ff0000"><i># $Date: 2002/12/03 18:48:27 $</font></i><font color=black>
</font><font color="#ff0000"><i># $Source: d:/Archive/CVS_QS/EMOS/EMOS_FRM/WR/FRM/TPL/Scripts/DRV/drv1/script,v $</font></i><font color=black>
</font><font color="#ff0000"><i># $NoKeywords: $</font></i><font color=black>
</font><font color="#ff0000"><i>################################################################################</font></i><font color=black>

</font><font color="#ff0000"><i>#**# </font></i><font color=black>
</font><font color="#ff0000"><i>#*	This main test implements a "dummy" step driver which you may use to</font></i><font color=black>
</font><font color="#ff0000"><i>#*	implement the real one.</font></i><font color=black>
</font><font color="#ff0000"><i>#*</font></i><font color=black>
</font><font color="#ff0000"><i>#*	The purpose of a step driver is to interpret the corresponding "Teststep"</font></i><font color=black>
</font><font color="#ff0000"><i>#*	cell of each test case. With "interpreting" we mean the process of splitting</font></i><font color=black>
</font><font color="#ff0000"><i>#*	the cell (Teststep) into individual steps and individually processing</font></i><font color=black>
</font><font color="#ff0000"><i>#*	each of them either by a built-in FRM functionality (e.g. LNK or EXE steps)</font></i><font color=black>
</font><font color="#ff0000"><i>#*	or by calling the specialised function.</font></i><font color=black>
</font><font color="#ff0000"><i>#*</font></i><font color=black>
</font><font color="#ff0000"><i>#*	This "dummy" template implements all the necessary interractions with the</font></i><font color=black>
</font><font color="#ff0000"><i>#*	emos_FRM_STP_lib and very carefully handles the return code in order to</font></i><font color=black>
</font><font color="#ff0000"><i>#*	produce correct WinRunner test results. All you need to do is to load the</font></i><font color=black>
</font><font color="#ff0000"><i>#*	apropriate libraries and handle the individual keywords (step names).</font></i><font color=black>
</font><font color="#ff0000"><i>#*</font></i><font color=black>
</font><font color="#ff0000"><i>#*	You should be aware of the fact	that this scripts typically call themselves</font></i><font color=black>
</font><font color="#ff0000"><i>#*	recursively and very much care is necessary in order to properly propagate </font></i><font color=black>
</font><font color="#ff0000"><i>#*	the return code (i.e. indication of failure) up the call chain. Therefore</font></i><font color=black>
</font><font color="#ff0000"><i>#*</font></i><font color=black>
</font><font color="#ff0000"><i>#*	&lt;p&gt;DO NOT MODIFY THE CODE OUTSIDE OF DESIGNATED AREAS UNLESS</font></i><font color=black>
</font><font color="#ff0000"><i>#*	&lt;ul&gt; </font></i><font color=black>
</font><font color="#ff0000"><i>#*	&lt;li&gt;you know what you are doing,&lt;/li&gt;</font></i><font color=black>
</font><font color="#ff0000"><i>#*	&lt;li&gt;you have to fix a bug (in this case please let us know) or&lt;/li&gt;</font></i><font color=black>
</font><font color="#ff0000"><i>#*	&lt;li&gt;you are prepared to live with the consequences.&lt;/li&gt;</font></i><font color=black>
</font><font color="#ff0000"><i>#*	&lt;/ul&gt;</font></i><font color=black>
</font><font color="#ff0000"><i>#* &lt;p&gt;REQUIREMENTS/PREREQUISITES:</font></i><font color=black>
</font><font color="#ff0000"><i>#*	The rest of the test suite should be developed according to FRM-principles</font></i><font color=black>
</font><font color="#ff0000"><i>#*	in order to make any use of this script.</font></i><font color=black>
</font><font color="#ff0000"><i>#*</font></i><font color=black>
</font><font color="#ff0000"><i># &lt;p&gt;PARAMETERS:</font></i><font color=black>
</font><font color="#ff0000"><i>#*	&lt;ul&gt;</font></i><font color=black>
</font><font color="#ff0000"><i>#*	&lt;li&gt;&lt;b&gt;table&lt;/b&gt;:		the name of the opened data table&lt;/li&gt;</font></i><font color=black>
</font><font color="#ff0000"><i>#*	&lt;li&gt;&lt;b&gt;test&lt;/b&gt;:		the name of the individual test case&lt;/li&gt;</font></i><font color=black>
</font><font color="#ff0000"><i>#*	&lt;li&gt;&lt;b&gt;reset_rc&lt;/b&gt;:	flag indicating whether this is the first or a recursive</font></i><font color=black>
</font><font color="#ff0000"><i>#*				invocation of this script.&lt;li&gt;</font></i><font color=black>
</font><font color="#ff0000"><i>#*&lt;/ul&gt;</font></i><font color=black>
</font><font color="#ff0000"><i>#* &lt;p&gt;RETURN VALUE:</font></i><font color=black>
</font><font color="#ff0000"><i>#*	&lt;ul&gt;</font></i><font color=black>
</font><font color="#ff0000"><i>#*	&lt;li&gt;&lt;b&gt;0&lt;/b&gt;:		successfull completion&lt;/li&gt;</font></i><font color=black>
</font><font color="#ff0000"><i>#*	&lt;li&gt;&lt;b&gt;&amp;gt;0&lt;/b&gt;:		unsuccessfull comletion&lt;/li&gt;</font></i><font color=black>
</font><font color="#ff0000"><i>#*	&lt;/ul&gt;</font></i><font color=black>
</font><font color="#ff0000"><i>#*/</font></i><font color=black>

</font><font color="#ff0000"><i># WARNING:  MODIFY THE CODE ONLY IN DESIGNATED AREAS!</font></i><font color=black>

<b>static</b> step, mode, comment;
<b>static</b> rc, frm_rc;

<b>if</b> ( reset_rc ) frm_rc = 0;

</font><font color="#ff0000"><i># IMPLEMENT YOUR OWN REPORTING HERE</font></i><font color=black>
</font><font color="#ff0000"><i># --&gt;&gt;--&gt;&gt;--&gt;&gt;</font></i><font color=black>
<b>report_msg</b>( </font><font color="#00bb00">"====================="</font><font color=black> );
<b>report_msg</b>( </font><font color="#00bb00">"Table: "</font><font color=black> &amp; FRM_get_name( table ) );
<b>report_msg</b>( </font><font color="#00bb00">"Test: "</font><font color=black> &amp; test );
<b>if</b> ( FRM_get_cell( table, test, </font><font color="#00bb00">"description"</font><font color=black>, comment ) == E_OK )
{
	wrlog_test_data( </font><font color="#00bb00">"DESCRIPTION"</font><font color=black>, comment );
	<b>report_msg</b>( </font><font color="#00bb00">"Description: "</font><font color=black> &amp; comment );
}
<b>report_msg</b>( </font><font color="#00bb00">"====================="</font><font color=black> );
</font><font color="#ff0000"><i># &lt;&lt;--&lt;&lt;--&lt;&lt; END OF REPORTING</font></i><font color=black>

rc = FRM_STP_init_steps( table, test, </font><font color="#00bb00">"Testsequence"</font><font color=black> );
<b>if</b> ( rc != E_OK ) 
	<b>treturn</b> rc;

</font><font color="#ff0000"><i># LOAD THE NECESSARY LIBs &amp; Guis HERE</font></i><font color=black>
</font><font color="#ff0000"><i># Use FRM_load_XXX() and you need not warry when to unload them.</font></i><font color=black>
</font><font color="#ff0000"><i># --&gt;&gt;--&gt;&gt;--&gt;&gt;</font></i><font color=black>
</font><font color="#ff0000"><i>#FRM_load_gui( table, GUI_HOME &amp; "&#92;&#92;" &amp; "???.gui" );</font></i><font color=black>
FRM_load_lib( table, </font><font color="#00bb00">"LIB/FRM/FRM_lib1_lib"</font><font color=black>, 0, 0 );
</font><font color="#ff0000"><i># &lt;&lt;--&lt;&lt;--&lt;&lt; END OF LOADING</font></i><font color=black>

<b>while</b>( FRM_STP_has_more_steps( table, test ) )
{
	rc = FRM_STP_get_next_step( table, test, step, mode );
	<b>if</b> ( rc == E_FILE_EOF )
		<b>break</b>;
	<b>if</b> ( rc != E_OK )
	{
		frm_rc++;
		<b>continue</b>;
	}
	<b>switch</b>( tolower( step ) )
	{
</font><font color="#ff0000"><i># PROCESS YOUR TEST STEPS HERE</font></i><font color=black>
</font><font color="#ff0000"><i># --&gt;&gt;--&gt;&gt;--&gt;&gt;</font></i><font color=black>
	<b>case</b> </font><font color="#00bb00">"prolog"</font><font color=black>:
		rc = FRM_Prolog( table, test, step, mode ); <b>break</b>;
	<b>case</b> </font><font color="#00bb00">"main"</font><font color=black>:
		rc = FRM_Main( table, test, step, mode ); <b>break</b>;
	<b>case</b> </font><font color="#00bb00">"login"</font><font color=black>:
		rc = FRM_Login( table, test, step, mode ); <b>break</b>;
	<b>case</b> </font><font color="#00bb00">"popup"</font><font color=black>:
		rc = FRM_PopUp_Message( table, test, step, mode ); <b>break</b>;
	<b>case</b> </font><font color="#00bb00">"navbar"</font><font color=black>:
		rc = FRM_Navbar( table, test, step, mode ); <b>break</b>;
	<b>case</b> </font><font color="#00bb00">"find flights"</font><font color=black>:
		rc = FRM_find_flights( table, test, step, mode ); <b>break</b>;

	<b>case</b> </font><font color="#00bb00">"search results"</font><font color=black>:
		rc = FRM_search_results( table, test, step, mode ); <b>break</b>;
	<b>case</b> </font><font color="#00bb00">"search results table"</font><font color=black>:
		rc = FRM_search_results_tbl( table, test, step, mode ); <b>break</b>;
	<b>case</b> </font><font color="#00bb00">"search results table2"</font><font color=black>:
		rc = FRM_search_results_tbl2( table, test, step, mode ); <b>break</b>;

	<b>case</b> </font><font color="#00bb00">"method of payment"</font><font color=black>:
		rc = FRM_method_of_payment( table, test, step, mode ); <b>break</b>;

	<b>case</b> </font><font color="#00bb00">"flight confirmation"</font><font color=black>:
		rc = FRM_flight_confirmation( table, test, step, mode ); <b>break</b>;
	<b>case</b> </font><font color="#00bb00">"flight confirmation table title"</font><font color=black>:
		rc = FRM_flight_confirmation_tbl_title( table, test, step, mode ); <b>break</b>;
	<b>case</b> </font><font color="#00bb00">"flight confirmation table invoice"</font><font color=black>:
		rc = FRM_flight_confirmation_tbl_invoice( table, test, step, mode ); <b>break</b>;
	<b>case</b> </font><font color="#00bb00">"flight confirmation table passengers"</font><font color=black>:
		rc = FRM_flight_confirmation_tbl_passengers( table, test, step, mode ); <b>break</b>;

</font><font color="#ff0000"><i>#	case "not-implemented-yet step":</font></i><font color=black>
</font><font color="#ff0000"><i>#		FRM_DRV_handle_unimplemented_block( step, frm_rc );</font></i><font color=black>
</font><font color="#ff0000"><i>#		continue;</font></i><font color=black>
</font><font color="#ff0000"><i># &lt;&lt;--&lt;&lt;--&lt;&lt; END OF TEST STEPS</font></i><font color=black>
	<b>default</b>:
		FRM_DRV_handle_unknown_block( step, frm_rc );
		<b>continue</b>;
	} </font><font color="#ff0000"><i># switch</font></i><font color=black>

	<b>if</b> ( FRM_DRV_handle_processed_block( step, test, rc, frm_rc ) )
		<b>break</b>;
} </font><font color="#ff0000"><i># while</font></i><font color=black>
	
<b>treturn</b> (frm_rc==</font><font color="#00bb00">""</font><font color=black> ? 0 : frm_rc);

</pre></body>