07-06-2013, 05:39 PM
Hi,
In a website "http://www.indianrail.gov.in/#" I need to find out link ""Revised Refund Rules w.e.f. 01.07.2013" and click on it.
I have written the code...it says link is found but not clicking on it.
What could be the reason?
In a website "http://www.indianrail.gov.in/#" I need to find out link ""Revised Refund Rules w.e.f. 01.07.2013" and click on it.
I have written the code...it says link is found but not clicking on it.
What could be the reason?
Code:
Set oLink = Description.Create()
oLink("micClass").value = "Link"
oLink("html tag").value = "A"
Set listLinks = oPage.ChildObjects(oLink)
no_links = listLinks.count
str = "Revised Refund Rules w.e.f. 01.07.2013"
For i=1 to no_links
arr =listLinks(i).getroproperty("innertext")
If instr(str,arr)>0Then
If listLinks(i).Getroproperty("visible")=True Then
print "link is found"
listLinks(i).click
wait 3
End if
Exit for
End If
Next