GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Testing Tools  >  QTP
Go To First  |  Previous Question  |  Next Question 
 QTP  |  Question 101 of 665    Print  
Give an example of a regular expression,user-defined function and built-in-function?
how to make a user-defined function reusable?

  
Total Answers and Comments: 2 Last Update: May 27, 2008     Asked by: Mann 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 29, 2006 05:33:09   #1  
Nageswara Rao G        

RE: Give an example of a regular expression,user-defin...
Regular Expressions: These r enable QT to identify Objects and Text Strings with varying values.There r so many examples for Regular expressions . plz refer Visual Basic6.0 any reference book.For example, start.* matches start, started, starting, starter, etc. You can use a combination of brackets and an asterisk to limit the search to a combination of non-numeric characters. For example: [a-zA-Z]* User Defined Functions: You can write your user-defined function directly into your test or component if you want to limit its use only to the local action or component, or you can store the function in an associated library file to make it available to many actions and tests or components (recommended). Note that if the same function name exists locally within your action or component and within an associated library file, QuickTest uses the function defined in the action or component. Function MyFuncWithParam (obj, x) dim y y = obj.GetROProperty("value") Reporter.ReportEvent micDone, "previous value", y MyFuncWithParam=obj.Set (x) End Function Built_in Function:QuickTest provides a set of built-in variables that enable you to use current information about the test and the QuickTest computer running your test. These can include the test name, the test path, the operating system type and version, and the local host name. (if u have any queries regarding QTP, plz send gnrao10@gmail.com)
 
Is this answer useful? Yes | No
May 27, 2008 02:07:36   #2  
kavitamurala Member Since: February 2008   Contribution: 5    

RE: Give an example of a regular expression,user-defined function and built-in-function?how to make a user-defined function reusable?
Hi...
Regular Expression is a pattern matching, where we can test the number of combinations at a time,like for charcters [a-z/A-Z], for numbers [0-9],we can also take apecial charcters for other usage.

Ex: Matching an IP address is another good example of a trade-off between regex complexity and exactness. bd{1,3}.d{1,3}.d{1,3}.d{1,3}b will match any IP address.

User defind functiions are functions which can be defind by us  as for our requirements, that can be .vbs file or .Txt file

Built-in functions are functions which are defined by QTP itself,like Click,Slecet,GetRoProperty()etc

 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : We can use com interface with database, excel, window script host. ...

I Have an interview in Qtp..Please could any one give me the hints what will they ask in interview..this is the first interview for me.
thanks in advance 
Read Answers (2) | Asked by : sanjana

How can I implement error handling in QTP, I know with Recovery Mangaer but how please give me detailed execution to how to handle giving an example?
Read Answers (1) | Asked by : vikram26

While validating 'Date format' . 
Latest Answer : In the sample "Flight" Appln, the fax order window has a title "Fax Order No: ". To identify this window we need to use Regular Expression ...
Read Answers (4) | Asked by : Bindu Puvvala

Latest Answer : Actually, there will be 3 types functions : --> Local script (Function definition and function call will be in script only ) --> Built functions (Predefined functions , only we have to call these functions) --> Library functions ...
Read Answers (9) | Asked by : kumar

HOW CAN I IMPLEMENT ERROR HANDLING IN QTP,I KNOW WITH RECOVERY MANAGER BUT HOW PLZ GIVE ME DETAILED TO HOW TO HANDLE GIVING AN EXAMPLE?
Read Answers (1) | Asked by : lakshmi narasimham

These are the new features which are available in QTP8.2 and which are not present in 6.5 version.Keyword View: Lets you easily build and maintain tests without writingVBScripts.Auto-Documentation: Provides 
Latest Answer : Really great help,Thanks ...
Read Answers (2) | Asked by : James

Latest Answer : QuickTest records and runs steps on ActiveX controls as it does on any other object.Using the Insert>Step Option , we can activate ActiveX control methods, retrieve and set the values of properties  and check the object exists.It is recommended ...
Read Answers (1) | Asked by : Srinivas reddy

Latest Answer : In the Expert View, you can use the Object property to activate the method for an ActiveX control. The list of available methods depends on the ActiveX control. ...
Read Answers (1) | Asked by : Srinivas reddy.B

How do u ignore exceptions raised by a procedure or function within a package.Ex: Package a { Proc1; Func1; ---- raised an exception Proc2; Proc3; }Note : Even if Func1 raises an exception proc2 and proc3 must be excecuted.
Read Answers (1) | Asked by : Uday Sharma


 Sponsored Links

 
Related Articles

SQA Software and Tools

SQA Software and Tools In quality assurance it is always important to get all the help we could get In other industries developers could easily check the products manually and discard those that do not meet the standard The length and the width of the product are checked to maintain standardization
 

Business Network Virtual Communication Tools

Business Network Virtual Communication Tools Since ages the Business community heavily relied on face to face communication for building Business relationships Face to face communications formed the basis for trust in a relationship An individual’ s appearance or the physical appearance of
 

C++ Pure Virtual Function and Base Class

C Pure Virtual Function and Virtual Base Class In this C tutorial you will learn about pure virtual function declaration of pure virtual function and virtual base class virtual base class and how to implement a virtual base class explained with examples mosgoogle center What is Pure Virtual Function
 

C++ Function Passing Types

C Function Passing Types In this C tutorial you will learn about function passing types two types of arguments passing in functions passed by value  and  passed by reference are discussed here mosgoogle center The arguments passed to a function can be performed in two ways Passed
 

What are Data Access Tools

Data access is the process of entering a database to store or retrieve data. Data Access Tools are end user oriented tools that allow users to build structured query language (SQL) queries by pointing and clicking on the list of table and fields in the data warehouse. Thorough computing history, t
 

What is DECODE function used for?

DECODE is used to decode a CHAR or VARCHAR2 or NUMBER into any of several different character strings or numbers based on value. That is DECODE does a value-by-value substitution. For every value that is given in the DECODE function it makes an if then check and matches the value. The general format
 

printf() Function Return Value

What is the return value from printf() function? printf function always returns the number of characters printed. Let us understand this with an example: main() { int a=10; printf("%d",printf("%d %d %d", a,a,a)); } In this above program the inner printf i
 

How is the main() function declared?

The declaration of main can be done as int main() One more declaration that can be taken by main is command line arguments form int main(int argc, char *argv[]) or this can also be written as int main(argc, argv) int argc; char *argv[]; NOTE: It is not possible for one to declare the main
 

How does the function call within function get evaluated?

Whenever we have more than one function which is called for a finite number of times then such a function gets evaluated from inside out. Let us understand this concept with an example. For instance consider a function sample called within it 4 times as given in program below: main() { int a=50;
 

What happens when a variable is not initialized in main function?

When a variable is not initialized in main function it contains garbage value. This can be well seen from the example below main() { int x; printf(“%d”,x); z= sample() } sample() { printf(“Testing program”); } Output is   &n
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape