how can we return a value from userdefined function for eg 2
functions in func1 iam getting 2 values(a,b) and storing in
var(C). now i want to pass that var(c) to another func2 give
me the script
Answer / nath t
Function returns only one value. when we assign the final
value with variable that name should be the same name of
the function name.
In the given example, som is the function it returns the
sum of two values when we assign that value to variable[i.e
same as function name(example: som = c)]
if you don't assign, function doesn't return any value
(example: z = c)
Example:
Function som(a, b)
c = a + b
som = c '(instead of these two step we can write in single
step like som = a + b)
End Function
x = 10 + som(10, 20)
msgbox x
you can pass this value in any other function.
Example:
y = som(som(10, 20), x)
msgbox y
Is This Answer Correct ? | 6 Yes | 2 No |
Suppose one object is changed in a project after delivering the project.Where we will update that object? it can be present in many scripts so can we update all the scripts?
Could we use QTP for java project(Which is develop in Netbeans and My SQL) otherwise which one is suitable?
Hi, I am new to QTP testing and was exploring the frameworks used for automation. I wanted help in writing various scripts and files for keyword driven automation like 1. Control File 2. Test Case File 3. Startup Script 4. Driver Script 5. Utility Script . etc It would be great if someone can give help in this context ... Thanks
What is the default object synchronization timeout in qtp?
Hi. please provide license key for QTP 9.2, I have windows XP on my machine Thanks in Advance, moreshwar
Anybody plz give, How do you test aframe in a web page? If page cotain text message or Images, tables?
What are the methods used in UFT to handle exceptions or run-time errors?
What is exact meaning of Database Checkpoint in QTP 9.2 and what are the different types of the database check points?
How to connect to oracle(sqlserver) database to QTP
what are the files created after executing QTP script file, please specify the file names with extensions
What is a recovery scenario?
How to record object in runtime. I am testing one Image website in which every time image change on home page.so if i records the image list but during running image get change, and QTP gives error