how can i pass parameters into function?

Answers were Sorted based on User's Feedback



how can i pass parameters into function?..

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

how can i pass parameters into function?..

Answer / deven

Function MyFunction(Argument1, Argument2)
MyFunction = Argument1 + Argument2
End Function

Is This Answer Correct ?    0 Yes 0 No

how can i pass parameters into function?..

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

how can i pass parameters into function?..

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

Post New Answer

More QTP Interview Questions

Wht is Smart Identification Mechanisam in QTP..Actually when do we this Technology means during Recording or running ....how is technology works. Anybody can expalin this .....Thanks in advacne

4 Answers   Siemens,


How you can make an action as re-usable action?

0 Answers  


What is the DIFF Between PROJECT AND PRODUCT?When Company will need Product?

5 Answers  


Where can I find and view run-time data table?

0 Answers  


Is it possible to run qtp scripts in Test Director(Scripts are uploaded in Test director)???and also how to see the test results in test director???

1 Answers  






what is the Debug view?

1 Answers  


In ordinal identifier there r 3 options available. Which one will be enabled first when ordinal identifier is invoked.

3 Answers   Cap Gemini,


what are the different u notice in betweem QTP version 8.2 and 9.2 and what is new in QTP9.2

1 Answers  


hai, i am doing QTP by own. So, i am confident in checkpts,synchronization, data driven test, recovery scenarioe manager etc. but actually i don't know how all these we wil implement while we r writting code manually. when we r doing practice, while recording code is automatically generated but in real time i heard that we have to write the script.But i don't know how it is? How to write descriptive prog.? plz. tel me what r the basic things we have to know? explain how to write descriptive prog.? explain me with an example pls.......

2 Answers   Vertex,


how to do spell check in QTP? reply please

8 Answers  


Hi Friends this is kumar i would like to request to all of you ,please help me to explain real time project with using qtp scripts i know basics of qtp but it won't workout on interviews,pls help awating to reply.

0 Answers   SoftTech,


How Exactly we can find out the INDEX No. of any object of an application when we test that application in QTP? Explain this by giving me the example of all LINKS of G-Mail (including home page, User-account page and all possible pages you ever seen in G Mail)?????? and if your answer is that as per appearance of objects(LINKS) in application we can find out the index number in application then tell me how you find out which object(LINK) having INDEX No. 1,2,3 and so on and how you say which object(LINK) is appeared first and which is last?

4 Answers   Infosys,


Categories