Monday, January 19, 2009

Get the font Size and Color of the Object

we can get Font size, Font color, Style and Font type with below code:

intFontSize=Browser(“Browsername”).Page(“PageName”).WebElement(“WebElement”).Object.CurrentStyle.FontSize

strFontColour=Browser(“Browsername”).Page(“PageName”).WebElement(“WebElement”).Object.CurrentStyle.Color

strFontStyle=Browser(“Browsername”).Page(“PageName”).WebElement(“WebElement”).Object.CurrentStyle.FontStyle

strFontType=Browser(“Browsername”).Page(“PageName”).WebElement(“WebElement”).Object.CurrentStyle.FontFamily

1 comment: