Forum Discussion
divernut
14 years agoOccasional Contributor
I apologies I was wrong. He did not get it from the help but from another post on here. http://smartbear.com/forums/forum/post/?mode=singleThread&thread=c8180fd1-d3bf-4b4b-9495-0a9e28bb1fd8 the following is the actual script we are trying to use.
var applicationName = "CALCit x64";
var bCaption = "Uninstall*";
var WshShell = new ActiveXObject("WScript.Shell");
var oExec = WshShell.Exec("RunDll32.exe shell32.dll," + "Control_RunDLL appwiz.cpl,,0");
Delay(2000);
Sys.Process("Explorer").Refresh();
//var wnd = Sys.Process("Explorer").FindChild("WndCaption", "Programs and Features");
var wnd = Aliases.Explorer.wndCabinetWClass.ShellTabWindowClass.DUIViewWndClassName.DirectUIHWND.CtrlNotifySink.ShellView.FolderView;
if (!wnd.Exists)
{
Log.Error("The 'Programs and Features' window was not found");
}
We have identical machines with the same processor, ram O.S. everything. He can run the code that is commented out above but when I uncomment it and comment the Aliases out it bombs. We have checked our options in testcomplete and they seem to be set the same. We are asigning the FindChild to a var and then use it.
If I uncomment the var wnd=Sys.Process line and comment the Aliases.Explorer line I get the following error.
The error log says: The 'Programs and Features' window was not found
Also you will notice the first Sys.Process("Explorer").Refresh(); is not commented out and Testcomplete does not compolain about it, just the next line.
I do not know what you mean by mapping criteria set up in your Alias definition.
var applicationName = "CALCit x64";
var bCaption = "Uninstall*";
var WshShell = new ActiveXObject("WScript.Shell");
var oExec = WshShell.Exec("RunDll32.exe shell32.dll," + "Control_RunDLL appwiz.cpl,,0");
Delay(2000);
Sys.Process("Explorer").Refresh();
//var wnd = Sys.Process("Explorer").FindChild("WndCaption", "Programs and Features");
var wnd = Aliases.Explorer.wndCabinetWClass.ShellTabWindowClass.DUIViewWndClassName.DirectUIHWND.CtrlNotifySink.ShellView.FolderView;
if (!wnd.Exists)
{
Log.Error("The 'Programs and Features' window was not found");
}
We have identical machines with the same processor, ram O.S. everything. He can run the code that is commented out above but when I uncomment it and comment the Aliases out it bombs. We have checked our options in testcomplete and they seem to be set the same. We are asigning the FindChild to a var and then use it.
If I uncomment the var wnd=Sys.Process line and comment the Aliases.Explorer line I get the following error.
The error log says: The 'Programs and Features' window was not found
Also you will notice the first Sys.Process("Explorer").Refresh(); is not commented out and Testcomplete does not compolain about it, just the next line.
I do not know what you mean by mapping criteria set up in your Alias definition.