Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / vikas choubey

Some Times QTP does not recognize the application object
during second run Or it run first time successfully then
QTP gives an error cannot identified the application Window
object properties does not match with the test object. There
might be a case of window name /object name is getting
changed each time. Here we required the use of regular
expression

During Recording of Flight application QTP record the
flight application it identified the Fax order window name
property like this

It Text Property is Fax order 11

If you run this script Again it will give an error because
Fax order Window name will be

Fax order 12
Cannot identify the object “Fax Order No. 11&#8243; (of class
Dialog). Verify that this object’s properties match an
object currently displayed in your application.

Line (1): “Window(“Flight Reservation”).Dialog(“Fax Order
No. 11&#8243;).Activate”.
Check regular expression check box A message will appear
click NO. Now change Text box value according to Regular
expreesion.

Fax Order No. 11 to Fax Order No.*

Here each time only last part getting changed here we use .*
as regular expression means it will check only Fax order No
text not whole string

Same case we can apply for different object properties if
they are getting changed

A regular expression is a string that describes or matches a
set of strings. It is often called a pattern as it describes
set of strings

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1821


What is the use of text output value in quicktest professional?

920


can u explain relative path architecture framework in qtp?

1947


please any one can explain the keyword driven framework. with gmail example.

2047


how will you check how many members visited the website www.infosys.com?

1869


what is the diff b/w assistive and mandatary rules of object repository in QTP???

2133


Which is the best QTP training institute in Delhi/NCR region and what is the approximate fee for QTP course (Basics and Advanced)

1804


How to Test the mainframe application?

2317


Some time when i wanna learn the object i face issue like i am not able learn the object in proper manner... eg:for text bo on web page it should learn as webedit but some times it reads as winobject:internetexpoler-server, because of this i have to uninstall the qtp and re-install it again when i do this it reads the object perfectly.....plz suggest the soln

1830


Analyzing the checpoint results?

981


Can the user toggle between using Local OR and shared OR for the same action?

916


How can we extract data like "Details","Result","Time" from the 'Run Error' result generated in QTP after run time errors are generated during a run & import the details etc...into excel sheet

1979


whow much strong on VB and C?

1875


How qtp identifies objects?

941


hi can any body give me a script for creating a modularity or keyword driven framework..i am working as a qtp tester for 2 months but still i am not exposed to framework in my company

1845