How to create Userdefined Function.Please write the steps
ans also provide example where exatcly we use it.
Answer Posted / chandu
Hi,
u can create user defined functions in notepad by saving
the file with .vbs extention.
eg:
public function add
x= 20
y= 30
z= x+y
msgbox z
end function
paste the above code in notepad and save it as .vbs ext.
then go to QTP file>settings>resources tab
add the .vbs file there. and then write-- call add---in ur
QTp editor.the use of this is u can reuse the same function
wherever u want. so u can call it multiple times in ur
test.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What do you mean by checkpoints in qtp?
What is standalone database?
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What's the difference between them? How to handle script issues?
Can U Explain about QTP tool from older version to latest version also its differences?
how we connect 1. qtp9.2 to the quality center9.0? 2. Load runner8.0 to the quality center9.0
What are the general steps involved in the data driven framework?
How do you perform Regreession Testing?
i have to login into gmail loginpage i have to pass testcase into userid and password by using functions. the test case of user id is it should take only lowerletters alphabetin between 4 to 6 length.it should not take spectial letters.it should not take numbers.testcase for password is it should take numbers and it should not take alphabets note the following things must happen 1 when i give correct password and userid that password and userid should be seen in QTP result and notepad,xl sheet 2 when i gave in valid password the system willgive message please give valid password that particular messaage should be seen in QTP result,norepa and xl sheet
What is active screen?
How does qtp identify gui object?
How to test login module with different username and password by using data driven testing in QTP?
hou can we use vb script in qtp could u tell me breafly
Explain sub procedure of vbscript.
Tell me about qtp?
Explain step generator in qtp?