Ask a Question

Testcomplete is unable to recognize objects for hwndsource

apurvak
Occasional Contributor

Testcomplete is unable to recognize objects for hwndsource

Hi,

 

I am converting VB scripts to JavaScripts. While converting the scripts I am facing issue with recognizing objects with hwndsource popup menu. Below is the code:

 

Sys.Process("TestStandDesigner").WPFObject("HwndSource: PopupRoot", "").WPFObject("PopupRoot", "", 1).WPFObject("Decorator", "", 1).WPFObject("NonLogicalAdornerDecorator", "", 1).WPFObject("ContextMenu", "", 1)

 

The application designed with special framework. if the application is developed as normal VS WPF application

then the objects are reconized correctly.

On ClickR() action the context menu is generated but its cannot be mapped with normal PopupMenu method or toolwindow.  While recording script testcomplete giving one popupRoot but it cannot be mapped again.

Error Message: No traces of popupRoot in Object browser

following the code when I recorded the script

  let xamDataTreeNodeControl = Aliases.TestStandDesigner.HwndSource_ShellView.ShellView.DockTGP.XamTabControl.GrdTreeView.AutomatTree.XamDataTreeNodeControl7;
  xamDataTreeNodeControl.ClickR(183, 11);
  xamDataTreeNodeControl.StackPanel.PopupMenu.Click("Edit Automat");

but Its not usable for next time.

I am also attaching the screenshot please check.

I there any way of mapping the popup menu ?

Can anyone please let me know what is the solution for above problem?

3 REPLIES 3
cunderw
Community Hero

Note sure without more information, but it sounds like a property was not copied over correctly for identifying your object or maybe a timing issue. We need more information. What does the object look like in the object browser?

 

Also, you should really be using name mapping or find methods. Full object paths like this are very failure prone. 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
TanyaYatskovska
SmartBear Alumni (Retired)

Thanks for the reply, cunderw,

@apurvak, was the issue resolved?

 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



AlexKaras
Champion Level 3

Hi,

 

> The application designed with special framework. if the application is developed as normal VS WPF application then the objects are reconized correctly.

.Net applications must be accessible to TestComplete. My guess is that the problem is because of how this 'special framework' was implemented by your developers.

Try to check these help articles (https://support.smartbear.com/testcomplete/docs/app-testing/desktop/wpf/template-support.html, https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/properties/open-apps/..., https://support.smartbear.com/testcomplete/docs/reference/options/engines/custom-controls.html) and talk to your developers if they can provide you with some useful info.

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
cancel
Showing results for 
Search instead for 
Did you mean: