cancel
Showing results for 
Search instead for 
Did you mean: 

The object "HwndSource_ShellView" does not exist.

SOLVED
Contributor

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");
      
}

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: The object "HwndSource_ShellView" does not exist.

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 


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

2 REPLIES 2
Staff

Re: The object "HwndSource_ShellView" does not exist.

can you give us a screenshot of the failed test log with the details tab of the failed test step where you are seeing the object not found error?

Best,
Justin Kim
Tags (1)
Community Manager

Re: The object "HwndSource_ShellView" does not exist.

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 


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors