examples of user definied functions? how to write user
defined functions in qtp9.2?
Answers were Sorted based on User's Feedback
Answer / viswanath
Its better to write user defined functions by using
Descriptive programing in notepad and save them as .vbs
extension. we can upload those files in QTP and we can use
those functions.
| Is This Answer Correct ? | 3 Yes | 0 No |
see..u can write user defined function in many ways.
here i am explaing u one sample example.
Public Function Func_Login(strUser,strPassWord)
Browser().Page().WebEdit("Name:=UserID").set strUser
Browser().Page().WebEdit("Name:=Password").setSecure
crypt.encrypt(strPassword)
Browser().Page().WebButton("Name:=Log In").Click
End Function
When ever u want to login to application u can call this
function with parameter values for User and Password.
Example:
sUser = DataTable.Value("UserName")
sPassword = DataTable.value("Password")
' Call the Login function for loggin in to application..
Func_Login sUser,sPassword
Note : the function can not contain Object repository. So
before calling or executing this function u have to
associate Object repostiroy to the Current Action where
this function is called. And also should assoicate the
function library file where this function is stored.
If any queries..
nanda.dreddy@gmail.com
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / sonu
using function definition generator,we can also write functions.
| Is This Answer Correct ? | 1 Yes | 0 No |
3. How to handle the exceptions using recovery secnario manager in Qtp?
1.How do u prepare the test suits in QC? 2.How do u convert requirements to test plan in QC?
what is descriptive.create()in qtp?
plz explain QTP real time work( Means where you store scripts and how u access scripts next day? where those activities we are maintaining, If By usig VSS how the process in going on , plz explain briefly?
How to convert non-reusable action into reusable action in QTP?(i know by default QTP will take it as a non-reuable action )(Chandana) plz urgent?
how can we compare descriptive programing with a regular expression
Can we directly automate testscripts accrdoing to requirements
2 Answers CitiGroup, Novartis,
Older version QTP is 8.2 and New version QTP is 9.2. My question is, Why it is QTP 9.2, why not 8.3,8.4 .... why it is not something ?
How can we open an Excel sheet through the script
I want to check in the data table(Globalsheet) column exist or not through script .If column not exist only proceeded to next step Pls tell me how to proceeded?
How you handles Pop-up windows which are Dynamically changing in Runtime?
i have doubt suppose iam purly working in QTP, when i will work on sql and performence testing? pls any one clarify doubt?