Re: Get data of dropdown object in the SwfTable
New DiscussionHello Alan,
I have a similar situation also using QTP 9.2 and the method descried above (copied below) works for me. Thanks for the info.
However, I have one more step to verify the functionality of that combo box: I need to select one of the values. How do I do that? Thanks in advance for your help.
Note: Normal usage is, I click on pull down, click on a value, click somewhere else and the value is now displayed and remais as the selection. I need to have a QTP script do that.
= = = =================
Dim ItemCount
ItemCount = SwfWindow(“Form1”).SwfTable(“ultraGrid1”).GetNAProperty(“DisplayLayout.Bands[0].Columns[Department].ValueList.ValueListItems.Count”)
Dim strValues
strValues=””
For i = 0 to ItemCount -1 step 1
strValues = strValues & “, ” & SwfWindow(“Form1”).SwfTable(“ultraGrid1”).GetNAProperty(“DisplayLayout.Bands[0].Columns[Department].ValueList.ValueListItems[” & i & “].DataValue”)
Next
= = = =========================