How to get Links count in an web application,without
descriptive programming?

Answer Posted / chaitu

This Script is Helpfull to count the No.of links in a web
page

Step1: Set Objects = Browser("BrowserName").Page
("PageName").ChildObjects

Step2: Objectcount = Objects.count
Linkcount = 0
Step3: For i = 1 to Objectcount-1

Link = Objects(i).GetROProperty("micclass")
If Link = "Link" Then
Linkcount = Linkcount+1
msgbox Linkcount
End If
Next
msgbox Linkcount ' It show total number links

Is This Answer Correct ?    7 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how to use QTP to check broken links on a page?

581


Hi Sudhananda, plz send me the QTP framework with any diagram and PPTS . I want to switch to automatio, I done QTP from professional person, but he does not give me his knowledge properly. so pls help me Thaks send me on following address mirajkar.akash@gmail.com

1865


whare exactly we have to use functions and sub routain

1840


Thanks....But can u tell me how i use the QTP for GIS with one Example...

1427


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

2522






Give the syntax to import/export xls into qtp.

584


What is meant by a Check Point in UFT? Also, explain the applicable Check Points.

703


Which features or drawbacks of QTP lead to the upgrade for a newer version?

569


we add library file used in test via settings or through "ExecuteFile" command. when we implement framework do we make common library file and load the same for all the test cases execution?

1576


what is vmodel?advantages and disadvantages of vmodel?

1612


How we can use the database checkpoint on a java web based application in which the database connectivity is done using JDBC->Pure Java type (in this type there is no need to create a DSN). At present in QTP we can fetch database values using checkpoint only through DSN. Is there any programming for this if we don't have DSN (ODBC)

1849


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

1352


Hi,Sudhanandareddy plz forword framework and ppts for QTP to me. This is my mail id: ranjith_99reddy@yahoo.co.in (your contact number also)

1735


Hello everyone! I am just writing a small test for a windows application. I have a problem with a text output value. The value i am trying to catch is presented in a scrollable textbox. When the text is too long, only a portion of it gets captured. Do you have any experience with this?

2139


Is it possible to change the values of analog recording?

570