cancel
Showing results for 
Search instead for 
Did you mean: 

Testcomplete is unable to recognize objects for hwndsource

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
Highlighted
Community Hero

Re: Testcomplete is unable to recognize objects for hwndsource

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

Re: Testcomplete is unable to recognize objects for hwndsource

Thanks for the reply, cunderw,

@apurvak, was the issue resolved?

 

---------
Tanya Gorbunova
SmartBear Community Manager

Join the September Hub-bub to show off, learn and win
Community Hero

Re: Testcomplete is unable to recognize objects for hwndsource

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 Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
Join the September Hub-bub to show off, learn and win