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

Tell some commonly used Excel VBA functions?

0 Answers  


How can i use virtual objects? If have i created one new virtual object in a virtual object manager by following instructions.

0 Answers  


I am getting the "test object property" Description properties "toolkit class" value By using "gettoproperty" in run time But my problem is how to get Ordinal Identyfier's type and value Type is index, value is 0 How can i keep this values in to required place How can i get these values in runtime I have to insert these "index" and "value" into another area Is there any script for this like "gettoproperties","Getroproperties" If anybody knows,please help me .

0 Answers   Livetek,


How u send bugs to dev'lpment team all at once or one by one or waht is the process?

2 Answers   kenexa,


Can we do Load Testing with QTP?

4 Answers  






can anyone please tell me what are all the shortcut keys used for qtp9.2? Thanks in advance..i expect ur valuable reply that help us our team???

1 Answers  


What is Virtual object wizard in QTP?

4 Answers  


How is the Bitmap checkpoint different from Image checkpoint?

0 Answers  


if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column which is worked for both edit and delete..how to write script for the button to test both operation on the web table using desriptive programing.. plz help me on script wheather using getroproperty Q2)what is the command for taking valiue from a web table in qtp

6 Answers   Logica CMG,


QTP 9.2, Issue: Creating Shared Object repository. I recorded 2 scripts. I exported the Object Repository to a shared location for the first script. Associated the exported repository to the first script and deleted the Local Repository for the First Script. Now Opened the Second script and try to Add the Local Object Repository of 2nd Script to Exported Object Repository. But I fail. Can anyone please help in providing steps that need to be followed in creating a shared object repository? Thanks in Advance.

3 Answers   Google, UHG,


How many types of parameters are available in quicktest professional?

0 Answers  


What is the difference in testing a client-server application and a web application?

0 Answers  


Categories