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

What is the qtp testing process?

596


Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks

1412


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

1457


i need qtp tutorial. pls send it to sridhar.k151@g mail.com

1637


For example you are checking bit map check point before coming to the results. How can you say it is passed? Or failed? Anyways?

614






I used child objects to get the no of weblist present in the weblist.now i need to select the items present in each weblist ?How to do so

2254


Can any give an example(if possible templates) how to test web application using QTP. thanks in advance

1551


Hi, I am using OutputCheckPoint for 2 webelements Bed:4 and Bath:2 Full,1 partial in my result page and I am storing the value in the data table. I dont need the string Bed:4,I would like to get only the no 4. How can I get it? Even though I highlight only 4,It is seleting the full value "bed 4". Same thing happend for second webelement Bath:2 Full,1 partial I need only the No 2. I used the following to split MyArray = Split(UIBathResult, " ", -1, 1) But it is giving the value My Array(0)=Bath:2full,1Partial I need the only the nos for further comparision.Any help? Thanks Uma

3242


How does you test a weblink which is changing dynamically?

548


what is the difference btn risks & Therads in the Test plan documentation?

1585


What is the descriptive programming?

1511


Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.

1699


Is it possible to merge two object repository files in qtp?

616


How to creating an output value using quicktest professional (qtp)?

568


What are the different ways to invoke an application using QTP?

641