Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exporting drop down values in Excel
#3
Solved: 10 Years, 9 Months, 3 Weeks ago
I am trying with following scripts, but still not get expected result.

Code:
dim i,f,x
SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\HP\QuickTest Professional\samples\flight\app\","open"
Dialog("Login").WinEdit("Agent Name:").Set "derfs"
Dialog("Login").WinEdit("Password:").SetSecure "4cc3c6e3f379b4bebf919e0c56d8d4ad4172027c"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type "111910"
f=Window("Flight Reservation").WinComboBox("Fly From:").GetItemsCount
datatable.AddSheet("output").AddParameter "from", ""
datatable.AddSheet("output").AddParameter"to",""
For i=0 to f-1 step 1
x=Window("Flight Reservation").WinComboBox("Fly From:").GetItem(i)
DataTable.Value("from","output") = x
t=Window("Flight Reservation").WinComboBox("Fly To:").GetItemsCount
For j=0 to t-1 step 1
t=Window("Flight Reservation").WinComboBox("Fly To:").GetItem(j)
DataTable.Value("to","output") = t
DataTable.SetCurrentRow(j+1)
If x <>t Then
Reporter.ReportEvent 0,"Res","Test Passed"
Else
Reporter.ReportEvent 1,"Res","Test Failed"
End If
Next
next
DataTable.ExportSheet "G:\QTP Result\Exported files\Get values form both drop down.xls","output"
Reply


Messages In This Thread
RE: Exporting drop down values in Excel - by sudhirzpatil - 10-30-2010, 09:53 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help for copying values from one excel to another excel vinodhiniqa 0 1,192 07-06-2017, 05:33 PM
Last Post: vinodhiniqa
  How import final calculated values by cell formula from Excel not the formula itself. qtped 1 4,727 01-17-2017, 04:05 PM
Last Post: sagar.raythatha
  Need to verify the drop down values based on condition santhoshmscsoftware 1 2,727 05-04-2016, 11:28 PM
Last Post: supputuri
Smile Importing Excel sheet - Reference Values are not recognized michiusa69 3 7,601 01-23-2015, 02:36 AM
Last Post: lkng2001
  Drag and drop issue excellentpawan123 0 2,609 01-13-2015, 05:04 PM
Last Post: excellentpawan123

Forum Jump:


Users browsing this thread: 1 Guest(s)