Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can you give me the code to calculate the total number of
Links using the child object in the web page..? is there
any other way to calculate number of links with out using
the Child objects.??

Answers were Sorted based on User's Feedback



Can you give me the code to calculate the total number of Links using the child object in the web ..

Answer / nanda

Hi Uday,

its nice answer. keep it.

and also u can use html tag instead of micclass..

like

linkDescObj("html tag").value="A"

it will perform same functionality.

Is This Answer Correct ?    3 Yes 0 No

Can you give me the code to calculate the total number of Links using the child object in the web ..

Answer / uday kumar_anem

Set fileSysObject=createobject("Scripting.FileSystemObject")
Set
linksFileName=fileSysObject.opentextfile("D:\samplelinkfile.txt",2,true)

Set linkDescObj=description.Create
linkDescObj("micclass").value="Link"
Set noOfLinks=browser("Browser").Page("Yahoo!
India").ChildObjects(linkDescObj)

For i=0 to noOfLinks.count-1
linkName=noOfLinks(i).getROProperty("name")
linksFileName.writeline(linkName)
Next
linksFileName.close
Set fileSysObject=nothing

Here i am retrieving all the links in Yahoo home page and
writing the link names in a text files.

If you wish to verify the number of links a web page, you
can use "Standard Checkpoint".
Click on Record button ->Insert Menu -> Check point
->Standard Checkpoint -> Click on any place in the page and
select the page in the Hirarchy and observe the number of
links property/value. If the total number of links are
increased or decreased, then it will show the differences.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More QTP Interview Questions

how to count the word "IS" is repeated in the application using DP

3 Answers   DST Global Solutions,


how did u use automating testing tools in ur job?

0 Answers  


What are the key points to create a framework in QTP for oracle forms?

0 Answers  


How can i use virtual objects? If have i created one new virtual object in a virtual object manager by following instructions.

0 Answers  


when we enter url,one page should open.write a vb script ,that page is open or not

2 Answers   Blue Chip India, Persistent,


How can you Open a Notepad and How can you write the test Resuts in Notepad by Using QTP?

3 Answers  


Without integrating QC/Testdirector with QTP, is it possible to keep track of the defects?If yes how? How to export QTP results to an excel sheet?

0 Answers  


How to attach a file to TD?

0 Answers  


How to run a test using quicktest professional?

0 Answers  


Hi..All I have installed QTP 10.0, and need to Automate SAP Application.....so i need to Install SAP Add-ins, anybady has SAP-Addins, Please help me, and thanks in advanced plese send it on my email id: sandipgami84@gmail.com Thanks, Sandip Gami +91-9714177088

1 Answers  


Hi Friends, Every one is posting the Answers for the existing questions.Try to post the questions that are asked in Recent Interviews.It will be useful to the other Job seekers.

1 Answers  


examples of user definied functions? how to write user defined functions in qtp9.2?

3 Answers   IBM,


Categories