Friday, February 29, 2008

GUI Automation Basics - Custom Objects

An object is created from a class. Every tool will support set of basic classes. These classes are called as standard classes. If any class is not a standard class, it is called as Custom Class. Any objects, which are developed by custom classes is called as Custom Objects.

Types of custom objects:
Case1: Objects which are similar to objects of standard classes.
Example: Third party command buttons,Rich textbox, tool bars and Outlook components.

Case2: Objects which are not not similar to any objects of standard classes.
Example: Microsoft Excel, Word

Case3: Objects which are not able to identify by the tool
Example: Advanced technologies, Paint and charts.

For example, Assume that my AUT's button class is a custom class. If developers used native API to develop buttons, those buttons would have been standard objects/controls. In this case, Custom objects are serving similar purpose of certain standard class. Another example is Rich text box, in which multiple lines can be entered.

In this case, we need to map custom class as corresponding standard class. After setting this, tool will start identifying the object as standard control instead of custom object. It is called as Class Mapping. Most of the tools are having flexibility of setting class mapping through coding or wizards.

For Example, Assume that your AUT is an add-on of MS Excel. In Excel, you can set one or more cells as any objects like listbox, command button, picture.

In this case, assume that tool is identifying as whole Excel grid portion as a single custom object. You need to write needed supporting functions by using keyboard simulations. You should organize all the functions in a easy maintainability way.

Few tools like winrunner and QTP are providing a flexibility. You can point out certain portion or area as one object and you can write a functions for them.

In case of advanced technologies, You should get proper support from tool vendor. Otherwise you can automate by using co-ordinates. In this case, you should use same system resolution and monitor size.

1 comment:

Pegasie said...

Thanks for sharing the post. This post have some nice topics shared about the objects and its classes. Objects when joined togeather then make class. As we use so many objects and classes in the automation testing services. Really nice post shared..

Automation Testing Services