How many ways return more then one value from function?
Answers were Sorted based on User's Feedback
Answer / suresh
what is mean by that script, which statements u can write in QTP TOOL and which statements u can write in Out side QTP? write with clesr info?
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / kurubaharibabu
Dear All,
I have updated all three ways the below code..
Function func1(a,b)
Dim c(3)
c(0)=a+b
c(1)=a-b
c(2)=a*b
func1=c
End Function
x=func1(2,3)
For i=0 to ubound(x)-1
msgbox x(i)
Next
'=====================================================
Function func2()
Dim c
c=array("har","babu")
func2=c
End Function
x=func2()
msgbox x(0)
msgbox x(1)
'===========================================================
Function func3()
Set dic=createobject("Scripting.Dictionary")
dic.Add "a","apple"
dic.Add"b","bal"
dic.Add"c","cat"
Set func3=dic
End Function
Set x=func3
msgbox x.Item("a")
msgbox x.Item("b")
msgbox x.Item("c")
'============================================================
Class user
Public var
Public cat
End Class
Function func4()
Set obj=new user
obj.var="hari"
obj.cat=123
Set func4=obj
End Function
Set x=func4()
msgbox x.var
msgbox x.cat
'===================================================================
| Is This Answer Correct ? | 1 Yes | 4 No |
What are the factors on which script execution time is dependent?
Write a Script With descriptive programming(Without Repository) to update an Update an order in Flight App and verify whether it is done successfully.(Use ChildObjects method)
Which Databases supports for QTP?
Without QTP (or any Testing tool) can we able to test the GUI part of the Applications. for Example generating the Scripts in Notepad and Executing them Using VB. Is it Possible to do so..
What is the Obect Repository type, we use in Automated Testing..in Real time.. Pls anybody can give the answer.. Thanks in advance...
What is Terminal Emulators”? Why we used in QTP.? How he works on QTP.
h u call the function
How to make qtp understand the difference amongst the same type of objects .suppose there are 5 check boxes in a page and I have to choose the 2nd one, how to do that through script?
i have opend 2 gmails i am working with 1 gmail i want to close other gmail by usig script. 2.i have 10 links in a page all of them have same properties& names i want to click on 5link by using script. 3.i have one combobox in that i want to see all the citynames in the combobox and i have to check weather hyderabad is present or not. 4. size of objectrepository. 5.what r problems we get during writing the script. 6.is it possible to compare to excel sheets in qtp if possible wht is the script. 7.example for lowlevelrecording
How to test whether the navigation i.e. from one page to another is working r not using QTP for web based application
1. IS A VIRTUAL OBJECT USED WHEN THE LABEL IS NOT RECOGNIZED BY QTP
What is the difference between low level recording and analog recording mode when it will be enabled.