cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to traverse through the elements of "TdxBarSubMenuControl" submenu type control

SOLVED
RajeshVV
Contributor

Unable to traverse through the elements of "TdxBarSubMenuControl" submenu type control

I'm dealing with Delphi controls where I need to click on a element from the displayed SubMenu. Able to traverse through the elements whereas I'm unable to click on the required control

 

Upon clicking the following control the pop-up from the attachment is displayed

 

set TestObj = Sys.Process("DevWin")._
VCLObject("frmMain").VCLObject("bsvMainApplication")._
VCLObject("tsBackstageControlPanel").VCLObject("fmeBackstageControlPanel")._
VCLObject("gbMain").VCLObject("gbColumnLeft").VCLObject("sbColumnLeft")._
VCLObject("grpDatabase").VCLObject("btnDatabaseSelection")


 

SubMenuIssue.png

 

 

I tried all the possible combinations and was unable to click on the required menu item

 

 

 

-Rajesh V V
1 ACCEPTED SOLUTION

Accepted Solutions
tristaanogre
Community Hero

Re: Unable to traverse through the elements of "TdxBarSubMenuControl" submenu type control

Have you mapped your actual control?  You have the button itself and you're clicking on it... but the TdxBarSubMenuControl I don't see in your path to your objects.  

 

So...  note the question marks:

set TestObj = Sys.Process("DevWin")._
VCLObject("frmMain").VCLObject("bsvMainApplication")._
VCLObject("tsBackstageControlPanel").VCLObject("fmeBackstageControlPanel")._
VCLObject("gbMain").VCLObject("gbColumnLeft").VCLObject("sbColumnLeft")._
VCLObject("grpDatabase").VCLObject("btnDatabaseSelection").???????.ClickItem('Default1');

 

 

I don't know if that's the right place for it, but somewhere in your application is a VCLObject for that TdxBarSubMenuControl.  That object, whatever it is, has the ClickItem method associated with it.

For more information, see https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/desktop/dev-express/...


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

View solution in original post

5 REPLIES 5
tristaanogre
Community Hero

Re: Unable to traverse through the elements of "TdxBarSubMenuControl" submenu type control

This looks like an owner drawn component... I've run into these before in Delphi applications.  You can't necessarily click by caption because the caption is not populated until the objects are drawn. 

 

Have you tried 

VCLObject("grpDatabase").VCLObject("btnDatabaseSelection").ClickItem(0)

Your other option would be to see if the drop down submenu can be mapped and if you can click on the items that way. 


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
RajeshVV
Contributor

Re: Unable to traverse through the elements of "TdxBarSubMenuControl" submenu type control

@tristaanogre

 

Thank you for the info.

 

Tried both the cases and it throws an error indicating

 

"Unable to find the object ClickItem(0). See Additional Information for details. 18:50:29 Normal " 

 

-Rajesh V V
tristaanogre
Community Hero

Re: Unable to traverse through the elements of "TdxBarSubMenuControl" submenu type control

Have you mapped your actual control?  You have the button itself and you're clicking on it... but the TdxBarSubMenuControl I don't see in your path to your objects.  

 

So...  note the question marks:

set TestObj = Sys.Process("DevWin")._
VCLObject("frmMain").VCLObject("bsvMainApplication")._
VCLObject("tsBackstageControlPanel").VCLObject("fmeBackstageControlPanel")._
VCLObject("gbMain").VCLObject("gbColumnLeft").VCLObject("sbColumnLeft")._
VCLObject("grpDatabase").VCLObject("btnDatabaseSelection").???????.ClickItem('Default1');

 

 

I don't know if that's the right place for it, but somewhere in your application is a VCLObject for that TdxBarSubMenuControl.  That object, whatever it is, has the ClickItem method associated with it.

For more information, see https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/desktop/dev-express/...


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

View solution in original post

RajeshVV
Contributor

Re: Unable to traverse through the elements of "TdxBarSubMenuControl" submenu type control

@tristaanogre

 

I've tried as you mentioned above and found that we can only perform click logically rather than the normal operation.

 

These were my observations

 

  1. Control which should be a Drop-down is displayed as simple button
  2. When I perform click on the button a drop-down list is displayed which is separated from the actual hierarchy
  3. Clicking on any of the items does not happen as a mouse click
  4. When I click some item using the existing methods an asynchronous object is displayed

Thanks,

Rajesh V V

-Rajesh V V
tristaanogre
Community Hero

Re: Unable to traverse through the elements of "TdxBarSubMenuControl" submenu type control

Based upon what I'm reading about the control type, this is expected.  The button is a button... the submenucontrol is a separate object that needs to be mapped and operated against.  That's the best I can do.  Sorry. 😞


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
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors