Forum Discussion
Oferv
13 years agoSuper Contributor
Sure Got you,
the AUT is a desktop application
here is the code:
main unit:
//USEUNIT InvokeAUT
//USEUNIT CloseAUT
function Main()
{
InvokeAUT["Invoke"]()
CloseAUT["Close"]()
}
InvokeAUT unit:
//USEUNIT CloseAUT
function InvokeAUT()
{
if(Aliases["AUTDesktopMainWindow"]["Exists"])
CloseAUT["CloseAUT"]()
//Loading the AUT
TestedApps["AUTDesktop"]["Run"]()
//Check that the AUT loaded properly
if(Aliases["AUTDesktopMainWindow"]["Exists"])
{
Log["Message"]("AUT was loaded properly")
return
}
else
Log["Warning"]("AUT wasn't load properly,script aborted")
}
function CloseAUT()
{
TestedApps["AUTDesktop"]["Close"]()
//Check that the AUTclosed properly
if(!Aliases["AUTDesktopMainWindow"]["Exists"])
Log["Message"]("AUT was closed properly")
else
{
Log["Warning"]("AUT wasn't closed properly,script aborted")
return
}
}
the AUT is a desktop application
here is the code:
main unit:
//USEUNIT InvokeAUT
//USEUNIT CloseAUT
function Main()
{
InvokeAUT["Invoke"]()
CloseAUT["Close"]()
}
InvokeAUT unit:
//USEUNIT CloseAUT
function InvokeAUT()
{
if(Aliases["AUTDesktopMainWindow"]["Exists"])
CloseAUT["CloseAUT"]()
//Loading the AUT
TestedApps["AUTDesktop"]["Run"]()
//Check that the AUT loaded properly
if(Aliases["AUTDesktopMainWindow"]["Exists"])
{
Log["Message"]("AUT was loaded properly")
return
}
else
Log["Warning"]("AUT wasn't load properly,script aborted")
}
function CloseAUT()
{
TestedApps["AUTDesktop"]["Close"]()
//Check that the AUTclosed properly
if(!Aliases["AUTDesktopMainWindow"]["Exists"])
Log["Message"]("AUT was closed properly")
else
{
Log["Warning"]("AUT wasn't closed properly,script aborted")
return
}
}
Related Content
- 12 months agosanket2799
- 3 years agoMichal_Ignaczak
Recent Discussions
- 2 hours agodhundley