GeekInterview.com
Series: Subject: Topic:
Question: 9 of 779

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
Asked by: rolimohanty | Member Since Jan-2010 | Asked on: Feb 12th, 2012

View all questions by rolimohanty   View all answers by rolimohanty

Showing Answers 1 - 2 of 2 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

  
Login to rate this answer.
prashanth

Answered On : 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

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.