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

How can we get ToolTip of the Link?

Browser("BrowserName").Page("PageName").Link("LinkName").FireEvent "onmouseover"

Wait(2)
ToolTipText= Window("nativeclass:=tooltips_class32").GetROProperty("text")

Tuesday, December 9, 2008

How to handle particular Runtime error?

Reporter.Filter=rfDisableAll
On Error Resume next
Value= Swfwindow("Window").SwfEditor("Editor").GetROProperty("text")
StartTime=now
While Err.Number=-2147220990 and Datediff("S",StartTime,Now )<50
Swfwindow("Window").SwfEditor("Editor").Type micF7
Value= Swfwindow("Window").SwfEditor("Editor").GetROProperty("text")'
msgbox err.number
Wend
Value= Swfwindow("Window").SwfEditor("Editor").GetROProperty("text")
On Error Goto 0
Reporter.Filter=rfEnableAll

Monday, December 8, 2008

How to find Runtime Error Number?

Msgbox Err.number

How to find the existance of a Column in the Datatable?

intParameterCount = DataTable.GetSheet("Global").GetParameterCount
For intParameterPosition = 1 to intParameterCount
strParameter = DataTable.GetSheet("Global").GetParameter(intParameterPosition).name
'Do evaluation of Column (Parameter) existance
If strParameter = "ColumnHeader" Then
msgbox "Found the Column"
Else
msgbox "Not Found"
End If
Next