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
What is the extension of the qtp local repository?
What are the types of object repository in qtp?
What is qtpro? What is quick test pro?
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
To which environments does quicktest professional (qtp) supports?
How to save your test using quicktest professional?
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?
Dear All , For UFT 12.02 which version QC or ALM will support ? Thanks Balaji
What are the recording modes in qtp?
How to explain a banking project in interview as a test engineer???
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..
What is the file extension of the code file and object repository file in QTP?
write the vb script for call to new action in qtp?
whare exactly we have to use functions and sub routain
How do client side image and server side image work?