#=============================================================================================
# @TITLE			5. Step DBM Wizard.
#
# @NUMBER			DBM2_FKT_02005
#
# @DESCRIPTION		Clicking 'Back' and checking the window content. Then 'Next' and again
# @					checking window content. Selecting the 'Instance Type' to install and
# @					going 'Next'.
#
# @EXP_RESULT		'Dababase Version' step.
#
# @REQUIREMENTS		"Database Manager" is installed.
#=============================================================================================
TestName = "DBM2_FKT_02005";
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 (Header == "Authorization") {		
		tl_step ("Installation wizard - 'Parameter Initialization' - 'Next'", "0", "Window is correct. - TN: " & TestName);
	} else {		
		tl_step ("Installation wizard - 'Parameter Initialization' - 'Next'", "1", "Window is incorrect. - TN: " & TestName);
	}
#=============================================================================================
# @STEP 2			Going next.
#=============================================================================================
	set_window ("Database Manager Installation Wizard", 2);
	button_press ("Next >");
	
	wait(2);
	
	ActiveX_get_info("DBMWfr2.Framework", "HeaderTitle", Header);
	
	if (Header == "Parameter Initialization") {		
		tl_step ("Installation wizard - 'Parameter Initialization' - 'Next'", "0", "Window is correct. - TN: " & TestName);
	} else {		
		tl_step ("Installation wizard - 'Parameter Initialization' - 'Next'", "1", "Window is incorrect. - TN: " & TestName);
	}
#=============================================================================================
# @STEP 3			Checking window content - Installation
#=============================================================================================		
	L_RC_1 = obj_exists ("< Back", 0);
	L_RC_2 = obj_exists ("Next >", 0);
	L_RC_3 = obj_exists ("Cancel", 0);

	if (L_RC_1 == 0 &&
		L_RC_2 == 0 &&
		L_RC_3 == 0) {
			
		tl_step("Installation Wizard - Parameter Initialization", "0", "All expected controls are displayed. - TN: " & TestName);
#=============================================================================================
# @STEP 4			Going 'Next'
#=============================================================================================		
		set_window ("Database Manager Installation Wizard", 6);
		button_press ("Next >");
	} else {		
		tl_step("Installation Wizard - Database Name", "1", "Not all expected controls are displayed. - TN: " & TestName);
	}
} else {
	
	tl_step("Database Manager Installation Wizard - Window Check", "1", "Window not open. - TN: " & TestName);
	WizardOpen = 0;
}
