07-18-2013, 12:36 PM
Hi Akhila,
the problem was with your instring i have corrected that please check the below code.
the problem was with your instring i have corrected that please check the below code.
Code:
Set oLink = Description.Create()
oLink("micClass").value = "Link"
oLink("html tag").value = "A"
Set oPage = Browser("title:=Welcome to Indian Railway.*").Page("title:=Welcome to Indian Railway.*")
Set listLinks = oPage.ChildObjects(oLink)
no_links = listLinks.count-1
str = " w.e.f. 01.07.2013"
For i=0 to no_links
arr =listLinks(i).getroproperty("innertext")
If instr(arr,str)>0Then
If listLinks(i).Getroproperty("visible")=True Then
print "link is found"
print arr
listLinks(i).click
wait 3
End if
print arr
Exit for
End If
Next