i have to check the link (broken) of a website.
I want to check the links upto 3 layers of website.How can i do that .
i have to check www.indianexpress.com upto 3 layers.
Gather all links in 1 layer into the array. Then, create a loop with navigating in each link from the array and so on.
Set ln_description = Description.Create()
ln_description("micclass").Value = "Link"
Set link_array = Browser().Page().ChildObjects(ln_description)
' You have an array with 1 layer links of the web site
For i = 0 to link_array.Count
Browser().Page().Navigate link_array(i).GetROProperty("href") ' may be you should attach the url of the web site in the begining
' and so on...
You could try something along the lines of:-
Dim arr(), i, html
For Each element in tags
If Ucase(element.tagname)="A" Then
ReDim Preserve arr(i+1)
In a function. Hope this snippet helps
I like what i know and I know what i like