How to export the contents of a combo box to the table?

I want to export the contents of a combo box to the data table so that i can parametrize the test using the data present in the combo box.
Thanks in advance
Roli

Questions by rolimohanty   answers by rolimohanty

Showing Answers 1 - 6 of 6 Answers

combo_box = Window("Window Name").WinComboBox("ComboBox Name");
cb_count = combo_box.GetItemsCount
For x = 0 to cb_count-1
cb_item = comboBox.GetItem(x)
INSERT INTO TableName VALUES(cb_item)
Next

  Was this answer useful?  Yes

prashanth

  • Mar 28th, 2012
 

You can see the combo box values in the run time data table.



Code
  1. cb_count=Window("window name").WinComboBox("Combobox name").GetItemsCount

  2. For x = 0 to cb_count-1

  3. cb_item = Window("window name").WinComboBox("Combobox name").GetItem(x)

  4. var=datatable.AddSheet("Sheetname").addparameter("col name",cb_item)

  5. next

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions