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

Answer Posted / uday kumar. a

In QTP, delaing of Regualar Expressions and varing object
descriptions can be handled by using Description
Programming.
Ex. of using Regular expression is:
u just record yahoo login operaion and click on Inbox link.
Assume u got 10 new mails, then it shows like Inbox(10).
Read one mail, now it shows like Inbox(9). Now try to play
the recorded script. It wont work. Now use Regular
expression in Inbox link like:
"Inbox.*". At that time it wil work.

Is This Answer Correct ?    98 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is Port testing. Whhen will you perform?

1500


What is the basic concept of quicktest professional (qtp)?

584


What is checkpoints for quicktest professional?

551


What are the technologies supported by qtp?

567


What is the extension of the recovery scenario file in qtp?

548






What is object repository in qtp?

561


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

1350


How do know the number of browsers opened?

627


Hi,All How to create a link in excel sheet using qtp

3003


HOw to add the recovery file at runtime to the test file .

1545


When should I use smart identification?

606


Who uses qtp tool?

579


What is the difference between qtp and selenium?

553


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

1608


I created 3 actions in test suppose I want to run action 1 in single time, action 2 is 4 time what I do?

599