How to use Regular Expressions in QTP

Answer Posted / jay prakash

Use Regular Expression (RE) in QTP to search for a specific
string format within the AUT. QTP recognizes all those
values that meet the search criteria specified in the RE.

A RE is a string of spl charcters that defines the
condition of a search. For examle in Flight reservation
application a diff order number is generated every time you
run the test. To accomodate these changing order number u
can use check point with RE so that QTP can recognize the
generated order number.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi, I have 2 dropdown listboxes called region and city/area. It needs to select one region(Santa Clara) and one city/Area (Sunnyvale).So I put this in the for loop and I am storing the Items in the variable called itemname. The regions value will get changed,so I used reg expression for this regions. This is my code Browser("MLSListings.com").Page("MLSListings.com").Link("» County/Area").Click Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Check CheckPoint("regions") ListSize=Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetTOProperty("items count") For i = 1 To ListSize-1 Itemname =Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetItem(i+1) Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Select Itemname ................. If I run the script,I am getting the following error, Cannot identify the specified item of the regions object. Confirm that the specified item is included in the object's item collection. Any Help? Thank you, Uma

1543


How you can write contexts to text file in qtp?

795


How do you handle multiple banners(at the top the page, the banner is scrolling) in a web page(Dont take the name property(regular expression))

1870


Where should i find checkpoint and virtual objects's Object properties and values in the QTP 9.2 Means where checkpoints or virtual objects related data will store If i want to get the runtime object properties how can i use Getroproperties on Checkpoints

1681


What are the ways you can synchronize?

773


How to customize checkpoints with parameters?

3226


What is checking bitmaps?

779


How to upload excel files into Quality Center using QTP Script and how to delete excel files from Quality?

821


What is test object model in quicktest professional?

822


Explain quicktest professional testing process?

734


Hi All , How can we decicde for pariticular frame(DataDriven or Keword Driven)in Project? Thanks Balaji

1588


What are the different properties of an web object

1634


Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..

1512


How can you identify the browser and its information using the qtp script?

778


Can any body please tell me the steps of keyword driven frame work in qtp. My mail is saswat445@gmail.com please send some materials on keyword driven testing in qtp. thanks a lot...

2013