what is functions in qtp?i know the userdefind &bulit
funation or i know that Private public function ?plz tell
me what is funations in qtp?how to create a funation in qtp
Answer Posted / pankaj sharma
1.Function in QTP : Function in QTP if nothing but the set
of line of code written in .vbs , .txt or in .qfl format to
which we pass n number of parameters and it return one
value .
You can add function in QTP using navigation as :
Setting > Resources
Where we can add user defined function which will be
accesible every where in QTP Suite .
To create funtion in QTP we can use funtion generator
option given in in QTP where we can set input and output
values also insert > Function Defination Genetator
Check a small example below
Call sum(8,4)
Function sum(x,y)
sum=x+Y
MsgBox sum
End Function
For any further doubt you can directly come to me on my
blog
http://quality2deliver.blogspot.com/
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to call a test from another test?
What phases are involved in testing an application in qtp?
• What type of testing questions will be asked for 2+ yrs exp people in interview?
What are the differences between table and db checkpoints?
what is description object?
How are actions and functions different in QTP?
PLEASE TELL ME WHEN DO YOU USE THE OBJECT SPY AT RUN TIME
What is data driver in qtp? Where we use it?
when I try to run below script in QTP "totalPages" value is 2. But i am getting error message (Type mismatch: 'totalPages' Line (): "For i=1 to totalPages".) totalPages=Browser("Name:=User").Page("Title:=User").WebElem ent("innertext:=of.*").GetROProperty("InnerText") msgbox totalPages For i=1 to totalPages rnum=Browser("Name:=User").Page("Title:=User").WebTa ble("column names:=User Name;ID;Last Name;First Name").GetRowWithCellText("store4") If rnum>0 Then r=rnum Exit for End If Browser("Name:=User").Page("Title:=User").WebElement ("html tag:=A","x:=471").Click MsgBox "Exit" Next
Get the count of files of similar types from a folder.
What is object spy in quicktest professional (qtp)?
What is the difference in the global and action sheet in qtp?
What is recovery scenario manager? When you go for recovery scenario manager?
How can you close the second opened browser?
how many maximum number of virtual users we can create?