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 |
I am having major problems with some DB Table Checkpoints I add to my script. I 35 web based applications recorded and each has DB Table Checkpoints insert but only 1 script isn't recognizing the DB Table Checkpoints for some reason. I've checked the DB connections and the info in the Library Functions and still only this one script out of 35 doesn't recognize the DB Table Checkpoints. Can someone please help me figure out why only this one script out of 35 that's hitting the same database is having a problem.
what are the environment variables,how do you use them. give an example.
How i can use Regular expression in QTP?give detailed steps for it.
How can you delete the results file (XML)
hi. I Am working in Small IT company as Test Engineer. But am looking for change. I have 2+yrs experience, but my problem is MCA 72%, remaining all are Second Division. plz give solution for my problem.am elgible for MNC's or not. if not plz give suggestion............ already i forwarded my resume to lot of MNC's but. I didn,t get CAL............ plz give any suggestion.
Hai Friends this is Rajesh , Is there any Site or Blog that Video tutorials of Qtp that can be free downloadable to Pc. Friends if any body know that site or blog please send me because i'm really in need for that because i cannot affordMoney in learning Course in Institutes due to Financial Problem . So please Forward that Site or Blog which provides Downloadable Video Tutorials in Free to PC , As My Friend is having PC thru that I'm planning to learn. So Kindly help me Friends if you are aware of that Site/Blog
can we run the scripts of qtp 8.2 in the qtp7.0?
Hi All, I want to know how can we schedule QTP scripts. Am using 9.5 version and in our office they want to schedule individual scripts of QTP so that it can run unattended during night time, Please help me how to do that. 2. what is the use of silent test run in qtp can I schedule the scripts in Silent runner, Please explain. 3.I retrieved data from the database using output value -> Database output value. the result of the query for eg is 5 rows, iam able to output the first row by selecting the cols and adding it to output, but am not able to do it for the rest of the rows. please tell me how to do it. Sorry for posting so many qns, am not able to find answ to any of the above in any websites, hoping that someone would really help me with these here, please help me. awaiting for ur immediate revert. Priya
What is the latest version of QTP? aster googling i found it 9.5 . but somewhere in my frnds resume i hve seen 10.0 so i am a bit confused pls let me know.
What is the difference between Call to Action and Copy Action?
What are the different types of recording modes in qtp? Which will be used when?
Define Error Pane of UFT?