what is the syntax for regular expression in QTP?
how to create user defined functions in QTP?

Answers were Sorted based on User's Feedback



what is the syntax for regular expression in QTP? how to create user defined functions in QTP?..

Answer / seethas

Uday is exactly correct.........

I m giving one example 4 regular exp.........
[1-9]--------->it accepts all 1 to 9 numbers......

Is This Answer Correct ?    10 Yes 1 No

what is the syntax for regular expression in QTP? how to create user defined functions in QTP?..

Answer / uday

Regular expressions enable QuickTest to identify objects
and text strings with varying values.

You can use regular expressions when defining the
properties of an object, the methods of an argument, when
parameterizing a step, and when creating checkpoints with
varying values.

A regular expression is a string that specifies a complex
search phrase. By using special characters such as a period
(.), asterisk (*), caret (^), and brackets ([ ]), you
define the conditions of the search.

we can write the user defined in a notepad and save the
file as .vbs and we then associate that to Test-Settings-
Resources-Associate Library Files by clicking plus and
select the .vbs file. In the script we can call the
function with function name ()

Is This Answer Correct ?    10 Yes 7 No

what is the syntax for regular expression in QTP? how to create user defined functions in QTP?..

Answer / ram

By using regular expression we can handle dynamic objects
in object repositiry.
When an object property will changing freaquently based on
input values that time we use regular expression.
we have nuber of regular expressions , But we are using 4
types of regular expressions * . ( )

Is This Answer Correct ?    1 Yes 0 No

what is the syntax for regular expression in QTP? how to create user defined functions in QTP?..

Answer / naren

RE enables us to find objects and Text strings with varying
values
Dim re As New RegExp
Dim ma As Match
re.Pattern = "[A-Z][0-9][0-9][0-9]" ' uppercase char
followed by 2 digits
re.IgnoreCase = False ' case sensitive search
re.Global = True ' find all the
occurrences
For Each ma In re.Execute(txtSource.Text)
Msgbox "Found '" & ma.Value & "' at index " & ma.FirstIndex
Next

Is This Answer Correct ?    3 Yes 3 No

what is the syntax for regular expression in QTP? how to create user defined functions in QTP?..

Answer / akshar jain

yes uday u r right

Is This Answer Correct ?    4 Yes 6 No

what is the syntax for regular expression in QTP? how to create user defined functions in QTP?..

Answer / saravanaraja

Regular Expression is used only for the dynamically
changeable element like Time.

This is the Regular Expression for Time ("1[012]|[1-9]):[0-
5][0-9](am|pm")

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More QTP Interview Questions

What is CMMP and CMMH?

0 Answers  


Explain the keyword driven framework for the window based application complete creation of library files,env file,test data,recovery file,excel file ,repository etc and as a test engineer how is ur approach

0 Answers   AppLabs,


can anyone please tell me what are all the shortcut keys used for qtp9.2? Thanks in advance..i expect ur valuable reply that help us our team???

0 Answers  


I would like to directly import XL file and work on that XL file directly in QTp script in that XL sheet need to allocate workbench,XL sheet and generate two bar graphs automatically how to do that? plz let me know any answers?

0 Answers   Wipro,


how will you load the test cases in ddt?

0 Answers  






An object is created, i dont know the methods available for that object, i want to find methods available for that object and use the required method. How i can do this???

4 Answers   HCL,


what is difference between normal mode and fast mode?

1 Answers  


How many actions we can create with in a test?

7 Answers  


Can u explain about QTP framework

10 Answers   ACS,


Where should we turn Smart Identification ON in QTP?

5 Answers  


I have many listboxes in my application. I have to check whether the contents inside the listboxes are in sorted order or not..can anyone please send the code as early as possible

0 Answers  


if interviewer asked about the framework used for automation how we will handle the question..means what should be the answer..plz help..which framework u r used in our company?

1 Answers   iGate,


Categories