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

Hi Friends ,I want to Know name of the Site for the QTP Help and the Best Book through that I can start the QTP Practice here also whare can I download the QTP Users Guide I search I was Unable .

4 Answers  


Tell me the situations where we will use Data Driven?

4 Answers   Ordain Solutions,


What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?

0 Answers  


examples of user definied functions? how to write user defined functions in qtp9.2?

3 Answers   IBM,


In my script there is a link(e.g. 'My Page') when I execute the script sometimes(not every time) QTP throws an error that "My Page(as link)" not found. Pleaase tell me where I need to update

3 Answers  


Pls can anybody send me the Recent Technical and Interview Questions Which were asked in IBM(QTP)Automation PLZZZZZZZZZ

0 Answers   IBM,


How do u write a regular expression for date (dd/mm/yyyy) field?

10 Answers  


how can i replace any text from the qtp script with some anothere text

1 Answers   Livetek,


What is the use of breakpoint in qtp?

4 Answers   Zensar,


Hi I am from delhi, Now I can surely say that no institution of QTP here in Delhi After reading you people I want to get cry, from last six month I am trying to learn QTP, I have knowledge too but dont know VB Script. Now it appears that without learning QTP no one can learn complete QTP, I want to get a formal learning in QTP. Can you suggest me the best institution. and please let me know the charges and span of the course too. thanks in advance to you alkaa.dugaal@gmail.com

1 Answers  


we have 10 more actions in our test and we are using exit action command to come out from the action if any error s occured.In action 1 if any error occurs control is moving to second action but if we get error in second action exitaction is throwing general run error. Please give a idea to overcome .

1 Answers   TCS,


describe some problem that u had with automation testing tool?

3 Answers  


Categories