write a function to read the items from Combobox of Flight
Reservation
application and save in excel.
Answers were Sorted based on User's Feedback
Answer / kishan
allItems=Browser().page().webComboBox().getROProperty("all
items")
arr=split(allItems," ")
'create excel appl object
set xlo=CreateObject("Excel.Application")\
xlo.visible=True
set wbo=xlo.Workbooks.open("D:\QTP\TestData\abcdef.xls")
set wso=xlo.worksheets("Sheet1")
for i=0 to ubound(arr)
j=i+1
wso.cells(j,1)=arr(i)
next
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / lavanya
This too works....
r=1
Function Fly_from()
Window("Flight Reservation").Activate
Window("Flight Reservation").WinComboBox("Fly From:").Drag 10,10
List =Window("Flight Reservation").WinComboBox("Fly From:").GetRoProperty("all items")
Cnt=Window("Flight Reservation").WinComboBox("Fly From:").GetItemsCount
msgBox List
msgBox Cnt
For i=0 To Cnt-1
Wso.cells(r,1).value=Window("Flight Reservation").WinComboBox("Fly From:").GetItem(i)
r=r+1
Next
End Function
Set odesc=CreateObject("excel.application")
odesc.visible=True
odesc.workbooks.open "path of excel file to store the list items"
Set Wso=odesc.worksheets("Sheet1")
call Fly_from()
Is This Answer Correct ? | 2 Yes | 0 No |
a=browser("vtiger CRM - Commercial").Page("vtiger CRM - Commercial").WebList("login_theme").GetROProperty("all items")
b=split(a,";")
Set obj=createobject("excel.application")
Set obj2=obj.Workbooks.Open("C:UserspushkarDesktopBook1.xls")
Set obj3=obj2.Worksheets("Sheet1")
For i=0 to ubound(b)
j=i+1
obj3.cells(j,1)=b(i)
obj2.Save
Next
Is This Answer Correct ? | 0 Yes | 0 No |
It is very important too save workbook else sheet will be empty.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / gourav
can anyone plz tell me the answer to this question?
Is This Answer Correct ? | 0 Yes | 2 No |
what is the use of Text output value in Qtp?
How to use Environment parameterization in QTP? Explain with an example.
What is a data driven test in qtp?
HOW TO FIND WEBTABLE? HOW TO RETRIVE THE WEBTABLE VALUES? PLZ TELL ME THE PROCEDURE.
Want to verify notepad reports using QTP framework or any other BV script method. Can anyone share the method to achieve it? Eg. Person Name is the header and the actual name is John then how can we verify weather person name is John
What is the difference Between LowLevel and Normal Recording Modes?
Hi all, I am using windows vista, I am in the process of learning QTP. When ever I try to work with insert mode in flight application , i am getting the error of 'Operation must use an update table query, fractional truncation(null) error. Can anyone help me regarding this?
what r the send key commands in QTP why they r used
Can anybody help me by sharing the code for checkbox in qtp using vbscript.
What is the difference in testing a client-server application and a web application?
What are the different properties of an web object
Hi guys, can anyone explain me whats the method for reporting the QTP test results to teamlead or non-QA member (developer/PM)? Thanks in Advance!!!!!