Forum Discussion
Hi Randy,
It seems that the menu control used in your application is actually a custom control inherited from the ComponentOne C1MainMenu control. If this is the case, please let me know the value of the C1.Win.C1Command.C1Commands property of the control.
Also, please let me know which exactly version of TestComplete you have.
- mithileshmaurya11 years agoOccasional Contributor
Hi I am working on a C1MainMenu.
I am supposed to click on a menu which opens a list of submenu items .I want to click on one of these submenu items.
When I record I get something like:
frmMain["C1MainMenu"]["Click"]("Maintenance|Add Edit Concentration Rating Details");
The above line works perfectly file when the object is used from NameMapping file.
But if I create the above object through descriptive programing :
var parent = Aliases["SM"]["frmMain"];
var arrayprop = new Array("ClrClassName")
var arrayval = new Array ("C1MainMenu")
var bla = parent["FindChild"](arrayprop,arrayval,300)
Log["Message"](bla.Exists) //I get "true" here .If I pass some coorinates it even clicks the menu item so I know that I am using the correct object.I dont want to pass the coorinates because the Submenu is displayed as an object of "MenuPopup".It is difficult to get the coordinates of each submenu item.bla["Click"]("Maintenance|Add Edit Rating Details");
I get a Type Mismatch error on this line.
Please help.We have started a huge project using the TestComplete desciptive programming, is there a differance in the supported methods for namemapping objects and objects created through descritive programing
- mithileshmaurya11 years agoOccasional Contributor
I was able to resolve the above issue
mithileshmaurya wrote:Hi I am working on a C1MainMenu.
I am supposed to click on a menu which opens a list of submenu items .I want to click on one of these submenu items.
When I record I get something like:
frmMain["C1MainMenu"]["Click"]("Maintenance|Add Edit Concentration Rating Details");
The above line works perfectly file when the object is used from NameMapping file.
But if I create the above object through descriptive programing :
var parent = Aliases["SM"]["frmMain"];
var arrayprop = new Array("ClrClassName")
var arrayval = new Array ("C1MainMenu")
var bla = parent["FindChild"](arrayprop,arrayval,300)
Log["Message"](bla.Exists) //I get "true" here .If I pass some coorinates it even clicks the menu item so I know that I am using the correct object.I dont want to pass the coorinates because the Submenu is displayed as an object of "MenuPopup".It is difficult to get the coordinates of each submenu item.bla["Click"]("Maintenance|Add Edit Rating Details");
I get a Type Mismatch error on this line.
Please help.We have started a huge project using the TestComplete desciptive programming, is there a differance in the supported methods for namemapping objects and objects created through descritive programing