How to use Regular Expressions in QTP? give an example.

Answer Posted / umasankar

Regular expressions enable QuickTest to identify objects
and text strings with varying values.You can use regular
expressions only for values of type string.

You can use regular expressions when:

1) Defining the property values of an object in dialog
boxes or in programmatic descriptions.

2) Parameterizing a step.

3) Creating checkpoints with varying values.

Example:

your site may include a form in which the user inputs data
and clicks the Send button to submit the form. When a
required field is not completed, the form is displayed
again for the user to complete. When resubmitting the form,
the user clicks the Resend button. You can define the value
of the button's name property as a regular expression, so
that QuickTest ignores variations in the button name when
clicking the button.

Is This Answer Correct ?    34 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the critical test cases in crm? tell me atleast 5 critical test cases? what are the critical bug u find out while testing crm domain?

2741


Presently i am working on QTP 8.2 Version,i want to know features in 9.2 version, because i have not sufficient time to put the effort on the 9.2 version

1413


What is the Difference between test object and run time object?

613


Does QTP record on Objects created on XWindows Environment?

1666


How to get Traceability matrix from TD?

682






Excel sheet having some datas and some datas present in the application (in table). How will you compare these two datas? Write code to fetch datas from Excel sheet.

1503


How can I find out the cursor position through QTP suppose I am keep tabbing(Pressing the tab key continuously) and stoped at a position Now I want to find out where the cursor position is

6307


when will you do debug your script? and explain that process?

1456


What environment does qtp run in?

628


I had installed QTP 9.2. It is working fine but whenever I open QTP, it is trying to reinstall the below-mentioned files again and again "QTP92PS82UPGRADE.exe", "recogn.dll". If anybody has these files, please provide those files in this site or you can send that files to my mail id also (lravi4u@yahoo.com). If you don't know where the files will be in the QTP, search in the QTP software CD or path of QTP program installed (C:\Program Files\Mercury Interactive\QuickTest Professional)

1467


Can you list some technologies that support qtp?

558


hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]

1462


Is there any pdf or online book for QTP Scripting? Let me know more about QTP Scripting.

2427


Who uses qtp tool?

579


What are main panes available in qtp test browser?

543