Tuesday, November 24, 2009

Get Mouse Over Color of a Link

Using ReplayType setting to Mouse Events while firing an onMouseOver event on the link.

You will see that the hover event is triggered with the ReplayType set to Mouse Events:

Setting.WebPackage("ReplayType") = 2
Browser("xyz").page("xyz").Link("xyz").FireEvent "onMouseOver"
MsgBox Browser("xyz").page("xyz").Link("xyz").Object.currentStyle.color
Setting.WebPackage("ReplayType") = 1


Or

Function GetoverColor(oLink)
Setting.WebPackage("ReplayType") = 2
oLink.FireEvent "onMouseOver"
GetoverColor = oLink.Object.currentStyle.color
Setting.WebPackage("ReplayType") = 1
End Function

No comments:

Post a Comment