Thursday, 21 July 2011

How to get font size, color, background color and other attributes of Web Element?

Dim a,b
Set a =Browser("Google_2").Page("Google").WebElement("India")
Set b= a.Object
sColor = b.currentStyle.color
sBackgrColor = b.currentStyle.backgroundColor
sFontSize = b.currentStyle.fontSize
sFontStyle = b.currentStyle.fontStyle
sFontFamily =b.currentStyle.fontFamily
sFontWeight = b.currentStyle.fontWeight

No comments:

Post a Comment