#=============================================================================================
# @TITLE			Cancel DB User Wizard.
#
# @NUMBER			DBM3_DBUser_003_Cancel_DBUser_Wizard
#
# @DESCRIPTION		Cancels DB User Wizard.
#=============================================================================================
static TestName = "DBM3_DBUser_003_Cancel_DBUser_Wizard";
static Failure = 0;

#=============================================================================================
# @STEP 1			check if Config Wizard is open ---> texit
#=============================================================================================
if (win_exists("Configuration Wizard",0) != E_OK)
{
	tl_step ("Wizard not open",1,"Testname: " & TestName & ", Line:" & getvar("line_no"));
	texit("true");
}	

#=============================================================================================
# @STEP 2			check cancel button
#=============================================================================================
set_window("Configuration Wizard", 1);
button_get_info("Cancel","enabled",Btn_enabled);

if (Btn_enabled == 0)
{
	tl_step ("Cancel Button	not available",1,"Testname: " & TestName & ", Line:" & getvar("line_no"));	
	win_close("Configuration Wizard");
	Failure = 1;
}

button_press("Cancel");

#=============================================================================================
# @STEP 2			check if window was closed
#=============================================================================================
if (win_exists("Configuration Wizard",0) == E_OK)
{
	tl_step ("Configuration Wizard not closed",1,"Testname: " & TestName & ", Line:" & getvar("line_no"));
	win_close("Configuration Wizard");
	Failure = 1;
}

#=============================================================================================
# @STEP 4			check if test passed successfully
#=============================================================================================
if (Failure == 0)
	tl_step ("Test passed successfully",0,"Testname: " & TestName & ", Line:" & getvar("line_no"));
