Forum Discussion
I wouldn't necessarily map individual items... depends somewhat on how TestComplete recognizes your drop down control. If you do an Object Spy on your dropdown control, does it have a method like "ClickItem" associated with it?
- russelld7 years agoContributor
No, the 'ClickItem' method is not there for the dropdown.
Also, should I Not map the 'child objects' for objects such as dropdowns, comboboxes, etc..?
Thanks
- shankar_r7 years agoCommunity Hero
I see drop down object is having child nodes which i guess the list options.
You can use FindChild to grab the listItem and make use of click method to click them.
like below,
function test(){ dropdownObject.Click(); //click the the drop to expend aqUtils.Delay(1000,"waiting for list render"); var listObject = dropdownObject.FindChild("<proname>","<propvalue>",1,true); if(listObject.Exists){ listObject.Click(); Log.Message("drop down clicked") }else{ Log.Message("drop down not clicked") } }
- russelld6 years agoContributor
Sorry I know its been a long time since you wrote this...the script runs through but it still won't click the listitems. Any other suggestions?
Thanks for the reply!
- tristaanogre7 years agoEsteemed Contributor
lot of it depends upon the class of the object. Looking at your screenshot, while this object is labeled as a "DropDown", it doesn't appear that TestComplete is recognizing it as such. What is the WndClass of the object?
As for mapping the child objects... Again, I wouldn't for the simple fact that it could be a dynamic list... the number of objects, etc., available are probably going to change and fluxuate and, in those kinds of situations, I typically don't map the objects but use some sort of "Find" method to find the object I want, assign to a variable, and then Click on it.- russelld7 years agoContributor
The WndClass isn't listed. How do I get that added?
Thanks Again
Related Content
- 12 months agolokwk216
- 11 years agoRavik
- 6 years agofunmay
- 12 years agositasrikanth
Recent Discussions
- 2 days agovladd1