Unable to traverse through the elements of "TdxBarSubMenuControl" submenu type control
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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")
I tried all the possible combinations and was unable to click on the required menu item
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 "
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Control which should be a Drop-down is displayed as simple button
- When I perform click on the button a drop-down list is displayed which is separated from the actual hierarchy
- Clicking on any of the items does not happen as a mouse click
- When I click some item using the existing methods an asynchronous object is displayed
Thanks,
Rajesh V V
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
