GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  QTP
Go To First  |  Previous Question  |  Next Question 
 QTP  |  Question 34 of 674    Print  
What is the function used while writing reusable actions scripts? and on what basis you will select reusable actions?

  
Total Answers and Comments: 4 Last Update: December 12, 2007     Asked by: subhash 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 19, 2006 00:32:34   #1  
madhu        

RE: What is the function used while writing reusable a...

Subash

Please read the question which u sent across.

Generally reusable scripts/actions will using based on the requriment.

Eg: Login script (for any application this is must)

Inside the application there are different modules say saving and checking account.

For a bank customer will be login to the application to make a transaction. For any customer login is must. But the account number is different ie login id is different and he will doing different transactions.

In that case login script will be the reusable script. main script will saving Acc or checking account.

Regards

Madhu D


 
Is this answer useful? Yes | No
July 17, 2006 01:08:13   #2  
Sai        

Function for Login in QTP

Hi All

Can any one send me a function for Login screen in QTP?

Your help is highly appreciated

Thanks and regards

Sai K. Sankar


 
Is this answer useful? Yes | No
October 21, 2007 12:40:26   #3  
b.sainarayanarao Member Since: October 2007   Contribution: 6    

RE: What is the function used while writing reusable a...
CREATING USER-DEFINED FUNCTIONS:(KEYWORD DRIVEN FRAMEWORK)
1. first record the login operation for once and place those statments in between 'Public function login(a p)' and 'End function statements' (a agent name p password). Replace 'agent name' input with "a" variable and 'password' input with crypt.encrypt("p") in recorded set statements.
2.Record and place Statements in public and end function statements for each function one by one.
3.Then copy all the statements 'ctrl+A' and 'ctrl+c' and paste & save them in notepad with '.vbs' extention.
4.In qtp Resources menu-object Repository-File menu-Export local objects-save them with .tsr extention.
5.Delete those created statements from qtp test window.
(NOW FUNCTIONS ARE CREATED AND READY FOR USE.)

USING FUCTIONS:
To use those above created functions in a test (for every test the following procedure is to be followed to use user-defined functions)
1.File menu-settings-Resources tab-Add(+) icon-Browse the path of the file created above with .vbs extention.
2.Resources menu-Associate Repository-Add(+) icon-Browse the path of the file created above with .tsr extention.
3. example for invoking login function. login "agent name" "password"


 
Is this answer useful? Yes | No
December 12, 2007 04:53:04   #4  
Nivethitha Ramanathan Member Since: December 2007   Contribution: 1    

RE: What is the function used while writing reusable actions scripts? and on what basis you will select reusable actions?
When you create an action click on the Reusable Actions check box.
When your application changes you can rerecord a
specific action without changing the rest of the test. Whenever possible
insert calls to reusable actions rather than creating identical pieces of script
in several tests.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape