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
How many tabs are available to view your test in a test pane and what are they?
What is the differences between image check point and bit map check point?
What we are looking for is to load properties of object dynamically as for our application the global repository will pretty huge. It will be really helpful to us if something similar to following functions of Winrunner is available in QTP. #Define descriptor auto strDesc; #set property in the descriptor Gui_desc_set_attr(strDesc,?Class?,?Edit?); --- put other properties #Add Edit box to GUI Map Gui_add(? ?,strWindowName,strEditboxName,strDesc);
In qtp, explain what is qrs file?
How is a Step generator used in UFT?
Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.
What is synchronization? What are the ways you can synchronize?
Is there any pdf or online book for QTP Scripting? Let me know more about QTP Scripting.
Hi Friends, I worked with 8.2 not with 9.2. Please help me in this prob. I created one script and recorded some think and save as Test 1 then I opened process--open the object repository manager. Switch to file->save->give some name->save as Objectrepo1.tsr file. (This is the global repository file.) Then I went to object repository->tools-> associate repository ->click + icon ->open the previously saved Objectrepo1.tsr file. This is the global repository Now I created one more script and save as Test 2. In this script I am calling script with the Help of "Call of existing action" and I executed but QTP is not able to execute B’cos it is QTP is not able to read the Object Repository of Test 1. Please let me know why? Once I made Script 1 as a shared Obj. Repository so it would not give any Problem. Right?
What are the recording modes in wave event?
What is the parameterization?
What is synchronization point in QTP?
How to start recording using quicktest professional?
What is ‘object spy’ and what is the function of object spy in qtp?
Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.