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



write a function to read the items from Combobox of Flight Reservation application and save in ex..

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

write a function to read the items from Combobox of Flight Reservation application and save in ex..

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

write a function to read the items from Combobox of Flight Reservation application and save in ex..

Answer / pushkar1206

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

write a function to read the items from Combobox of Flight Reservation application and save in ex..

Answer / pushkar1206

It is very important too save workbook else sheet will be empty.

Is This Answer Correct ?    0 Yes 0 No

write a function to read the items from Combobox of Flight Reservation application and save in ex..

Answer / gourav

can anyone plz tell me the answer to this question?

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More QTP Interview Questions

Hi Friends... What you are doing in Regression Testing and how many test cases you ran in regression testing... suppose there is 1000 test cases is there how many test cases again you run .. 1000 test caes r how many... thanx in advance..

6 Answers  


I have a library function , with that function 100 scripts are being called. The library function is changed(something is added) . how do i update all the scripts.

1 Answers   IBM,


What is the Diff between Image check-point and Bit map Check point?

15 Answers   CTS,


1...HOW MANY TYPES OF OBJECT REPOSITORY ARE THERE IN QTP? 2....WHAT ARE THE REPOSITORY FEATURES EXPLAN. 3...HOW TO CREATE A RECOVERY SCENARIO? WHAT DOES RECOVERY SCENARIO MANAGER DO? 4...OPEN A WORD FILE AND MODIFIED WITH SOME VALUE USING QTP? 5... HOW TO CREATE EXCEL FILE USING QTP? 6... HOW TO RETRIEVE A VALUE FROM WEB TABLE? 7... WHAT IS QC REQUIREMENT TAB DO ? HOW TO MAP THE REQUIREMENT? 8... HOW TO PASS A VALUE FROM EXCEL FILE TO SCRIPT? 9...WHAT IS THE USE OF SPLIT FUNCTION?

1 Answers   RBS,


I want to do Certification course in QTP. For this I request you to suggest the best Tutorial in PDF format, and also tell me the best institute and the estimate cost for joining the institute ib delhi NCR. Hence, if possible, kinldy mail PDF file to my mail-ID: kumar123.pathak@gmail.com , Regards, kumar pathak

0 Answers  






When to use Descriptive programing?

2 Answers   Wipro,


Output values? i want a practical example

0 Answers  


Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in

0 Answers  


what is a test strategy & what is the difference between test strategy & test plan?

5 Answers  


I am new with QTP. Is anybody could tell me where I can find a good tutorial with lots of samples?

0 Answers  


Explain about reusable actions?

3 Answers   IBM,


Why we use QTP ,We can use other tools like WR OrSilktest What r the options in Qtp that WR and Swilktest Does not have.

0 Answers   Hewitt,


Categories