cancel
Showing results for 
Search instead for 
Did you mean: 

The object "HwndSource_ShellView" does not exist.

SOLVED
Highlighted
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
Highlighted
Community Manager

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

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

2 REPLIES 2
Highlighted
Staff

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)
Highlighted
Community Manager

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

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get properties of a web page element

See replies!

Compare images using the Region Checkpoint

See replies!

Compare HTML table with Excel file and correct data in Excel file

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!
Top Kudoed Authors