Hello,

Can we capture only the labels of the web page in the
object repository. If yes, then how.

Actually my scenario is:
I have to capture all the label of mercury site
http://newtours.mercuryinteractive.com/tour/mercurypurchase.
php.
and want to copy all these labels in the notepad.

So,please help me how to do this all.


Thanks in advance,
Gaytri

Answer Posted / guest

Good Question.......

here i used regular expressions concept with descriptive
prgming...Rough idea given to u...surely this approach can
work out...

Set opage=browser("Gmail: Email from Google").Page("Gmail:
Email from Google")
Set childobjdes = Description.Create()
childobjdes("mic class").value="Web Element"
childobjdes("html tag").value=".*[A-Za-z0-9].*"
childobjdes("outer text").value =".*[A-Za-z0-9].*"
set allobj = opage.ChildObjects(childobjdes)
msgbox allobj.count
For i=1 to allobj.count-1
text=text&allobj(i).getroproperty("outer text")
Next
msgbox text

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1802


Explain the types of object repositorys in qtp?

580


Plz Explain AUTOMATION REFERENCE MODEL?

1686


How will you compare keyword and expert view?

541


How to Open FireFox using descriptive programing? If my question is not clear, i will give an Example To Open Internet Explorer, We use Set IE = CreateObject(InternetExplorer.Application) IE.Navigate "www.yahoo.com In the same i need to open yahoo.com in firefox. Can any one tell me what is the server name of firefox to create an object

2530






How is recording done when a application is over lapping the QTP application it gives a message object not recorded

1577


Hi am New to Automation Testing , any one can you help me what are the basic questiion are asked an interview?

1425


What is the difference between local and shared object repository in qtp?

567


what is the advantages and disadvantages of using functions instead of re usable actions

1433


Why do you create a text checkpoint on a Web application? What is the purpose of the Close method?

1362


Have you used xml check point in your project?

558


Hi All, How to get repeated word in string . Thanks Balaji

943


How to do the scripting. Are there any inbuilt functions in QTP? What is the difference between them? How to handle script issues?

576


What is TOM in QTP?

1806


Explain in brief about the quicktest professional automation object model?

519