#=============================================================================================
# @TITLE			10. Step DBM Wizard.
#
# @NUMBER			DBM2_FKT_02013
#
# @DESCRIPTION		Start installation.
#
# @EXP_RESULT		'Installing' step.
#
# @REQUIREMENTS		"Database Manager" is installed.
#=============================================================================================
TestName = "DBM2_FKT_02013";
static WizardOpen = 1;
#=============================================================================================
# @STEP 1			Going 'Back' and checking window content.
#=============================================================================================
if (win_exists("Database Manager Installation Wizard") == 0) {

	set_window ("Database Manager Installation Wizard", 2);
	button_press ("< Back");
	
	wait(2);
	
	ActiveX_get_info("DBMWfr2.Framework", "HeaderTitle", Header);
	
	if (GUI_Version == "2") {
		exp_Header = "Installation Mode";
	}
	if (GUI_Version == "3") {
		exp_Header = "Creation Mode";
	}
	
	if (Header == exp_Header) {		
		tl_step ("Installation wizard - 'Installation Mode' - 'Back'", "0", "Window is correct. - TN: " & TestName);
	} else {		
		tl_step ("Installation wizard - 'Installation Mode' - 'Back'", "1", "Window is incorrect. - TN: " & TestName);
	}
#=============================================================================================
# @STEP 2			Going 'Next' and checking window content.
#=============================================================================================
	set_window ("Database Manager Installation Wizard", 2);
	button_press ("Next >");
	
	wait(2);
	
	ActiveX_get_info("DBMWfr2.Framework", "HeaderTitle", Header);
	
	if (GUI_Version == "2") {
		exp_Header = "Start Installation";
	}
	if (GUI_Version == "3") {
		exp_Header = "Start Creation";
	}
	
	if (Header == exp_Header) {		
		tl_step ("Installation wizard - 'Installation Mode' - 'Next'", "0", "Window is correct. - TN: " & TestName);
	} else {		
		tl_step ("Installation wizard - 'Installation Mode' - 'Next'", "1", "Window is incorrect. - TN: " & TestName);
	}
#=============================================================================================
# @STEP 3			Save template as ...
#=============================================================================================
	set_window ("Database Manager Installation Wizard", 2);
	toolbar_button_press ("msvb_lib_toolbar", "Save Template as ... ");
	
	set_window ("Save Template As", 2);
	toolbar_button_press ("Save in:_1", "Desktop");
	edit_set ("File name:_1", database & ".dbi");
	button_press ("Save");
	
	if (win_exists("Save Template As_1",0) == 0) {

		set_window ("Save Template As_1", 3);
		button_press ("Yes");
	}
#=============================================================================================
# @STEP 5			Starting installation.
#=============================================================================================
	set_window ("Database Manager Installation Wizard", 2);
	button_press ("Start");
	
	wait(4);
} else {
	
	tl_step("Database Manager Installation Wizard - Window Check", "1", "Window not open. - TN: " & TestName);
	WizardOpen = 0;
}
