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 |
Hi. I have completed B.TECH(CS) , But I will go to "SECURITY CONSOLE OPERATING" [C.C CAMERA abservation]. IF interviwer asks " Why you choose this job ?" What we will say? urgent.........................urgent...........
how to check URL using QTP? write vb script with descriptive programm only?
What is smart identification?
how can i call reusable action in a function could any one explain me?
what is the process to follow between writing the test cases & then atomating it?
What is the entry and exit point of automation testing
what is Property......End Property loop? how to write sript for it in QTP
I am using descriptive programming for my project.when QTP deosn't identity or recognize a object by record and playback method,is it possible to make QTP identify that object using descriptive programming? Note: The object doesn't have unique properties and same properties used in Record and playback are only available, no extra properties are defined.
actually how many hours per one day we will work on automation (qtp) in real time
What are the framework folders?
I am executing a batchfile.In one script on one Button i have inserted a checkpoint.It is in a loop,my checkpoint is going to fail sometimes.That failed results only I have to log in a file.How it's possible...pls give the solution for this?
please send detail navigation for merging of object ripositories in QTP 8.2
3 Answers Infosys, Ordain Solutions,