Hi, I am scripting in VB using Automated QA- Test Complete.
Does anyone know how I can validate that an Application has opened? i.e. the logic is open the app, and login - after logging in, verify that the app has been opened, if not abort the test as there is nothng much that can be done if the app doesnt open! I am used to writing USerchecks, but the app doesnt support it - whats the best way you reckon
Cheers! [img]/images/graemlins/confused.gif[/img] <font color="purple"> </font>
Using the WMI service search all the processes while waiting for your process to appear,
// Search Task Manager
var strComputer = ".";
var strQuery = "Select * from Win32_Process where name = '" + AppName + "'";
var objWMIService = GetObject("winmgmts:\\\\"+ strComputer +"\\root\\cimv2");
var wmiProcesses = objWMIService.ExecQuery(strQuery);
var wmiItems = new Enumerator(wmiProcesses);
var intCheck = 1;
while (wmiProcesses.count < 1)
var wmiProcesses = objWMIService.ExecQuery(strWQL);
intCheck += 1;
if (intCheck > 10)
Log.Enabled("The Application was not opened", Sys.Desktop.Picture());
The function above was translated into JScript from VBScript. The VBScript Version is on MSDN...
I recommend that you use the approach described in the "Waiting for a Process or Window Activation" help topic. If waiting for a specific process and window to appear is not enough in your case, you need to wait until a specific message is displayed in the status bar or until another property changes as it is described in the "Waiting for Object State Changes" help topic.