ChandanD
5 years agoContributor
The object "HwndSource_ShellView" does not exist.
When I execute the script on my local machine it is working fine and it is able to identify the window correctly.
But when I execute the same script via Jenkins it is giving error message of Unable to find "HwndSource_ShellView"
Could anyone let me know the reason why am I getting the error message.
unction viewhelp()
{
var testStandDesigner = Aliases.TestStandDesigner;
/// Launching latest version of teststand designer application
var ExistingApp=Aliases.TestStandDesigner;
if(ExistingApp.Exists)
{
ExistingApp.Close();
if(Aliases.TestStandDesigner.dlgTeststandDesigner.Exists)
{
Aliases.TestStandDesigner.dlgTeststandDesigner.btnYes.Click();
}
}
//var StrApplName = "C:\\KBApps\\TeststandDesigner\\TeststandDesignerCtrl.exe";
var path = Project.Path;
Log.Message(path);
var StrApplName = path+"..\\..\\..\\TestStand_Designer\\TeststandDesigner\\Lib\\Assembly\\TeststandDesignerCtrl.exe";
Log.Message(StrApplName)
TestedAppIndex= TestedApps.Add(StrApplName)
TestedApps.Items(TestedAppIndex)
TestedApps.Items(TestedAppIndex).Run()
var titleBar=Aliases.TestStandDesigner.HwndSource_ShellView;
Mainform = testStandDesigner.WaitAliasChild("HwndSource_ShellView",50000)
//WshShell.Run(StrApplName);
titleBar.SetFocus()
titleBar.Activate()
titleBar.Maximize()
// var StrApplName = path+"..\\..\\..\\TestStandDesigner\\Lib\\Assembly\\TeststandDesignerCtrl.exe";
// WshShell.Run(StrApplName);
// Delay(15000);
// var titleBar=Aliases.TestStandDesigner.HwndSource_ShellView;
// titleBar.Maximize();
//
// Delay(15000);
//
// Log.Message("Teststand Designer Application Launched");
// Delay(1000);
var menupanel = testStandDesigner.FindChild(Array("ClrClassName","ClrFullClassName"),Array("Menu","System.Windows.Controls.Menu"),100);
var panelhelp = menupanel.WPFMenu.Click("Help|Help F1");
Delay(2000);
var helpwindow = testStandDesigner.FindChild(Array("WndCaption","WndClass"),Array("TSD Help Documentation","HH Parent"),100);
helpwindow.Close();
var ExitApp = menupanel.WPFMenu.Click("Project|Exit");
}
Hi ChandanD ! Could you provide us with more info as hkim5 requested?
Also, I'm encouraging you to enroll in the free course we have specifically tackling the Object not found errors. After completing it, you will be able to understand why such errors occur and how to handle them.
Here's the link - https://academy.smartbear.com/store/727583-testcomplete-handling-the-object-not-found-errors