Hi Surabhi,
U can follow both approaches. Either using OR/DP
Let me show you both methods:
Method 1: Using OR
I here assume that all the links are present on the same page.
msgbox = Browser("").Page("").link("").getroproperty("color")
repeat the same for all 10 links .This will return you a value in hexadecimal value.
Compare the value and get the color of link.
for example 0000ff is the value for blue link.
Method 2:Using Descriptive Programming
Function ClickLink(LinkName)
Set oLink = Description.Create()
oLink("micclass").Value = "Link"
oLink("name").Value = LinkName
Set collection = browser("").page("").Childobjects(oLink)
For i = 0 to collection.count -1
ColorValue = collection(i).GetROProperty("color")
if StrComp(ColorValue,"ff0000") = 0 then
collection(i).Click
exit For
End If
next
End Function
I hope this helps.
Enjoy Automation
Shantanu
On Friday, 1 November 2013 00:43:05 UTC+5:30, surabhi wrote: