cancel
Showing results for 
Search instead for 
Did you mean: 

Problems mapping item in submenu in Delphi application

SOLVED
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

1 ACCEPTED SOLUTION

Accepted Solutions
New Contributor

Re: Problems mapping item in submenu in Delphi application

@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.

5 REPLIES 5
Community Hero

Re: Problems mapping item in submenu in Delphi application

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

Highlighted
Community Hero

Re: Problems mapping item in submenu in Delphi application

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
[Community Expert Group]
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
Extensions available
New Contributor

Re: Problems mapping item in submenu in Delphi application

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.

Community Hero

Re: Problems mapping item in submenu in Delphi application

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


Robert Martin
[Community Expert Group]
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
Extensions available
New Contributor

Re: Problems mapping item in submenu in Delphi application

@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.

New Here?
Join us and watch the welcome video:
Join the September Hub-bub to show off, learn and win