Tuesday, April 27, 2010

Rules for Object Recognition

Object Recognition is very important thing in any GUI testing tool. Silktest also having set of formats and limitations to identify the objects.

MicroFocus/Borland used to publish "Rules for Object Recognition" document for each silktest release. It is available at techpubs-Rules for Object Recognition

Rules for Object Recognition
Caption - Restricted to 127 characters
WindowID - Restricted to 63 characters
Closest Static Text or Attached Text
4Test Produces – Window Declaration Identifier, Single Tag or Multitag
Agent Produces – Index, Prior Text, Location
Extension Produces – WindowID, Caption

We can manage the automation suite properly for minor application changes by making proper tags. I have given few tips to control the UI changes in the application.
Window declarations Level
1. Object caption change. Use multiple tags
2. Object level change. Assume that UserName text field is under a HtmlTable. Now you set a window variable to have same object level.
3. Same set of objects are in multiple pages. Create a class.
4. Use Variables for page title changes.

Functions Level
1. Navigations. For example, clicking a link, clicking a button.
2. Micro functions. Split to small functions as you have to change in only one place.
3. Use some wrapper functions for all classes. For example, an object is a htmlcheckbox and now it is changed to radio button.