Wednesday, April 23, 2008

Tooltip verification in Browser

SilkTest does not have any built-in function, to get tooltip from browser controls. In browser, there is no ToolTip control, but the few attributes (Alt) are used to simulate a ToolTip.

Using Silktest, we can execute javascript statements in browser at runtime. By using that, we can get tooltip from web objects. In the following example sAltProp variable gets the tooltip of AutoImage object.

STRING sAltProp = MyApp.AutoImage.ExecMethod('getAttribute("alt")')

Similarly we can use javascript to get more info from any browser based objects. QTP is using VBScript. Using QTP also, we can achieve the same like above.

No comments: