how can i pass parameters into function?
Answers were Sorted based on User's Feedback
Answer / venkat
In the above answer (a,b) are the arguments not parameters.
And we called as arguments in functions.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / deven
Function MyFunction(Argument1, Argument2)
MyFunction = Argument1 + Argument2
End Function
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / bluemoon_bala
From the information, i understand that u have written a
function and trying to pass values to that funciton..
Here is an example:
I have created a function called Add and taken two arguments
" a" and "b". And called that function by passing the values
as 2 and 3
Function Add(a,b)
c=a+b
msgbox c
end function
add 2,3
| Is This Answer Correct ? | 2 Yes | 4 No |
Answer / sunil reddy
We will defeinitely pass the parameters to Function
Try with this Example
First parameterize the Agent name with invalid data like sun
Dialog("Login").Einedit("AgentName").Set datatable.Value
("Agent")
Call the function
Function Login(Sunny)
Dialog("Login").Einedit("AgentName").Set datatable.Value
("Agent1")
End Function
| Is This Answer Correct ? | 0 Yes | 4 No |
What is meant by Pseudo Code?
i am new to qtp i do not know how to write script how to write the code to login if it fails how to able error messages
what is diff b/w function and action?
How do you invoke any application and write a script to invoke QTP using VB Script.
Why is Client side image is preferred over server side image?
What is the Command used to start the QTP
What is the difference in between function and sub as well as give some code of both
Can we Script any test case with out having Object repository? or Using Object Repository is a must
Can any body explain me how to prepare QTP frame work with an example?? alexander.gdk@gmail.com
example-date format is 01-jan-09 in QTP.How to convert this format to 01-01-09?
Explain the concept of object repository & how qtp recognizes objects?
How will you set a unique four digit number in an edit field in QTP?