I have a dropdown object in the SwfTable. When I activated on the cell, dropdown object is present. I want get data in dropdown but cannot. Please help me.
Let's start out with what is the SwfTable, and what is the DropDown object. Use the .NET Windows Forms Spy(under the Tools Menu) and click on the object. It should tell you it's type name. Either that or you can use the ObjectSpy, and Click on the object, and see what the SwfTypeName is.
Second are you using Infragistics products, NetAdvantage and TestAdvantage, and if so what versions?
Third what data are you trying to get? Are you trying to get the list of data? Perhaps including a screenshot of the SwfTable, and the Dropdown, dropped down, and highlight the information that you want to garner.
I'm using TestAdvantage and NetAdvantage 2007 vol 2. My problem as below:
1. Click on cell in the SwfTable, dropdown object is present
2. Click on dropdown/combobox object, list of data is present
I want get list of data of the dropdown/combobox object
Please help me ASAP
The method to find out the contents of a drop down within the grid will depend on how the drop down was put into the grid. This could be an editor control or a ValueList. For this information, you will have to contact your developers.If a ValueList has been used, then you could get the count from the ValueListItems.Count of the columns ValueList. You could then loop through an get the DataValue or the DisplayText for each ValueListItem. The following is sample VB script that accomplishes this:Dim ItemCountItemCount = SwfWindow("Form1").SwfTable("ultraGrid1").GetNAProperty("DisplayLayout.Bands.Columns[Department].ValueList.ValueListItems.Count")Dim strValuesstrValues=""For i = 0 to ItemCount -1 step 1 strValues = strValues & ", " & SwfWindow("Form1").SwfTable("ultraGrid1").GetNAProperty("DisplayLayout.Bands.Columns[Department].ValueList.ValueListItems[" & i & "].DataValue")NextMsgBox strValues
In the above script example, Department is the key of the column with the value list.
Let me know if you have any questions with this matter.
Is there a similar solution for TestAdvantage 2006 Vol 2 CLR 1.x? I'm using QTP 9.2 with TestAdvantage 2006 Vol 2 CLR 1.x and I'm getting the following Run Error: "Getting property value for ValueListItems throws the following exception: Invalid Property name: Property ValueListItems not found".
There is more than one way to add a drop down column to a grid and the method that I provided may not apply to all cases. Do you know how the drop downs are being added to the grid in your case?
If you are unsure, you may need to ask the developers who work on the application you are testing. Once you find this out, let me know what method is being used and I will take a closer look at this specific case.