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

If u r using library files (Instead of Check Points) , How do u do bitmap check ?

1465


Where we can use the analog mode and where we can use the low – level mode?

576


What is the keyword view and expert view in qtp?

546


HI, pls help me on this, iam not able to capture getcelldata value in javatable... msgbox javawindow("").javatable("").getcelldata(3,3) but it diaplays empty...

2403


What are the types of environment variables in qtp?

558






Can launch two instances of qtp on the same machine?

587


When we r doing data driven test with chkpts, i want to insert formulae in data sheet but i didn't get. How we wil do that plz. explain in detail.

1617


What is the difference between a Function and Procedure in QTP?

697


How to connect to a database?

585


what type of automation is follwed in the project?

1493


What are the flaws in water fall model and how to overcome it?

566


How to Get the Run-time value of an object under that web app under Test to the local data table sheet of that Action?

3610


What are the different recording modes and how do they work?

624


I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...

1472


we use a file extension .properties why is it used and where do we use it plz help me out with detailed explanation and navigation of how to use on the QTP 8.2?

1643