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...

what is regular expression how will you implement it?

Answer Posted / srinivas

Let us take yahoo! site as an example. Then the script will
be something like:

===========================================================
Browser("Yahoo! Mail - The best").Page("Yahoo! Mail - The
best").WebEdit("login").Set "TestUser"
Browser("Yahoo! Mail - The best").Page("Yahoo! Mail - The
best").WebEdit("passwd").SetSecure "460205b87f0543"
Browser("Yahoo! Mail - The best").Page("Yahoo! Mail - The
best").WebButton("Sign In").Click
Browser("Yahoo! Mail - The best").Page("Yahoo! Mail -
TestUser@").Link("Addresses").Click
Browser("Yahoo! Mail - The best").Page("Yahoo! Address
Book -").Link("Mail").Click
Browser("Yahoo! Mail - The best").Page("Yahoo! Mail -
TestUser").Sync
===========================================================

Here the page title is continuously changing. but, all
titles contain "Yahoo!"

When ever, you click on any tabs, i.e. (mail, compose,
addresses, etc), the page title changes. but, still
contains "Yahoo!" as part of the string. in this case, we
can use regular expression (while using descriptive
programming):

============================================================
====
Browser("Yahoo! Mail - The best").Page
("ClassName:=Page", "title:=Yahoo.*").WebEdit
("ClassName:=WebEdit", "Name:=login").Set "TestUser"

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the extension of the qtp local repository?

1083


What are the types of object repository in qtp?

1039


What is qtpro? What is quick test pro?

1058


1--How many functions u develop 2--What is an array 3-- where is ur server 4--U involved in unit testing 5--how ur test the background colour using QTP

1966


To which environments does quicktest professional (qtp) supports?

1023


How to save your test using quicktest professional?

1060


For QTP Test Engineer, What is his contribution to the Project? Means, As as automation test engineer what is his role in the current project?

2307


Dear All , For UFT 12.02 which version QC or ALM will support ? Thanks Balaji

1395


What are the recording modes in qtp?

1053


How to explain a banking project in interview as a test engineer???

3152


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object..

2316


What is the file extension of the code file and object repository file in QTP?

1109


write the vb script for call to new action in qtp?

2290


whare exactly we have to use functions and sub routain

2327


How do client side image and server side image work?

1855