Monday, 8 August 2011

How to get the vaues from combobox in QTP?

'Get the count of items from windows combo box
n=Window("Flight Reservation").WinComboBox("Fly From:").GetItemsCount()
For i=0 to n-1
datatable.SetCurrentRow (i)
'Get the items from the windows combobox
val =Window("Flight Reservation").WinComboBox("Fly From:").GetItem(i)
datatable("Flight",dtLocalsheet)=val
Next
datatable.ExportSheet "d:\sam.xls","Action1"

No comments:

Post a comment