Ask a Question

Problems mapping item in submenu in Delphi application

SOLVED
wpinheiro
New Contributor

Problems mapping item in submenu in Delphi application

Hi Team,

 

I'm having trouble mapping the 3rd level menu of a Delphi program.

 

menu_cadastros.png

 

Mapping x Result

1 - Sys.Process("Contas").VCLObject("Form_Menu")

Mapping Result: Ok

 

2 - Sys.Process("Contas").UIAObject("Menu").MenuItem(2)

Mapping Result: Ok

 

3 - Sys.Process("Contas").Window("#32768", "", 1).MenuItem("Atualização TNUMM")

Mapping Result:

The object with the specified attributes does not exist.

Possible causes of the error

Tested object:
Sys.Process("Contas").UIAObject("Menu")

 

* All menu objects were mapped with the TestComplete Object Spy. TestComplete Version 14.10.999.7 x64

5 REPLIES 5
Marsha_R
Community Hero

Try recording a test using that 3rd level item and see what TestComplete thinks the object is from that.


Marsha_R
[Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
tristaanogre
Esteemed Contributor

Usually, you shouldn't need to map all the SubMenus.  You can send a "ClickItem" command to the menu bar with each menu underneath separted by a pipe


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

This "ClickItem" method does not exist in the Menu or Submenu map. The method in the submenu item I need to select is just "Click ()". However, Testcomplete does not find runtime mapping. Only finds when getting value with Object Spy.

tristaanogre
Esteemed Contributor

@Marsha_R had a suggestion to try recording the steps to see how TestComplete recognizes it.  What happens when you try that?


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

@tristaanogre this way the object is mapped using the "Click ()" method (click at point). I was able to solve the problem in another way. Thanks for the help.

cancel
Showing results for 
Search instead for 
Did you mean: