cancel
Showing results for 
Search instead for 
Did you mean: 

How to get names of dropdown items from a TdxBarDropDownListBox object?

SOLVED
Highlighted
New Contributor

How to get names of dropdown items from a TdxBarDropDownListBox object?

I am trying to get list item names and click on a specific item from a drop down list. But there is no way to find the names of the list items. The list parent object can be mapped but it has only one property related to the list items which is 'Count'. This shows the number of list items. The parent object also doesn't have any Child items. Can anyone please help me with getting this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Contributor

Re: How to get names of dropdown items from a TdxBarDropDownListBox object?

Try adding TdxBarDropDownListBox class in the text recognization and see whether Microsoft lib helps you to get the text object.

If the above way dint help try adding the same class in MSAA list as well.

View solution in original post

7 REPLIES 7
Highlighted
Community Hero

Re: How to get names of dropdown items from a TdxBarDropDownListBox object?

List items in a list box are not seperate items that are mapped.  They are in some property within the control itself.  Look to see if there is a wItemCount or wItem property.  Look, also, for perhaps something like "Items"


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

Re: How to get names of dropdown items from a TdxBarDropDownListBox object?

You have search for any property inside the Obj Spy for the names. 

Generally I use to get the name under Items .. Names or Display or Text

Tags (1)
Highlighted
New Contributor

Re: How to get names of dropdown items from a TdxBarDropDownListBox object?

Hi,

This listbox doesn't have names, display, text, wItemCount or wItem property. It has only 'Items' property but the value of that is only '(Object)'. There is no way to get the names. Is there any way to get the names from it?

Highlighted
Contributor

Re: How to get names of dropdown items from a TdxBarDropDownListBox object?

1. Have you tried entering that Items Object and see any property in it?

2. What is happening if you are trying to do record script for the same dropdown?

 

Highlighted
New Contributor

Re: How to get names of dropdown items from a TdxBarDropDownListBox object?

1. I tried getting the properties of the 'Items' object and it returns some properties like 'CommaText', 'DelimitedText' which shows a string of the list items separated by comma. There is another property 'Count' which shows the number of list items. But is there any way to click on a specific item? I can only check if an item is in the list, but cant click it.

 

2. For record script, it just clicks on a specific coordinate like this-

Aliases.names.TdxBarDropDownListBox.Click(48, 58);

 

 

Highlighted
Contributor

Re: How to get names of dropdown items from a TdxBarDropDownListBox object?

Try adding TdxBarDropDownListBox class in the text recognization and see whether Microsoft lib helps you to get the text object.

If the above way dint help try adding the same class in MSAA list as well.

View solution in original post

Highlighted
New Contributor

Re: How to get names of dropdown items from a TdxBarDropDownListBox object?

Thanks anupamchampati for the suggestion. Adding the classname under Text recognization worked successfully in this case as testcomplete doesn't have support for this type of control. 

New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Let's start July with new challenges!

Create a script to pass custom command-line arguments as a test parameter for the TechCorner tag!

Will you dare to take the challenge?


Top Kudoed Authors