how do you count the total no.of links in a webpage using qtp
hi friends,
in my interview with Satyam, i have faced this question
Re: how do you count the total no.of links in a webpage using qtp
[QUOTE=saritha_racharla;21555]hi friends,
in my interview with Satyam, i have faced this question[/QUOTE]
By using Childobject method we can count the number of likes in a web page. the code will be like this
Set obj = Description.Create()
obj("html tag").value = "A"
Set childItems = browser("Google").Page("Google").ChildObjects(obj)
msgbox childItems.count
Please revert me in case of any clarifications
Re: how do you count the total no.of links in a webpage using qtp
Hi,
Try to use [B][COLOR="Blue"]No of Links[/COLOR][/B] property of Page CheckPoint. It will gives exact number of count about number of URL's currently presents on the page.
Thanks
CPS