Thursday, February 28, 2008

GUI Automation Basics - Object Identification

Two years ago, I was conducting an interview for automation engineer to our team. One candidate has totally 6 years Testing experience and it includes 1 year silktest automation experience.

My question is "what do you meant by framework?"
She replied that frame will be taken by using windows declarations.

It seems that she used to run the scripts and not developed scripts. I have seen many testers are trying to add automation experience in their resume. But they are not having basic understanding properly.

I thought, understanding Object Identification is needed first. Then only testers can do scripting properly for dynamic applications and custom objects. Most of the GUI automation tools are identifying the objects by following things. I have listed by priority.

Class - Tool is identifying the object's class. The class name would have defined by developer or used from generic controls.
Type of Object - Based on class, tool makes sure the type of object.
Title/Caption - The caption or title of the object. Windows, dialogs, menus and push button have caption.
Attached Text - The text which is used to identify the object. Example: TextField,CheckBox, Radio button, Combobox
Prior Text - The text which is prior to that particular object. It is different from attached text. This is identified by Left to Right or Right to Left order. Mostly this text is taken as Top to bottom.
Window ID - It is useful for stand alone applications. Windows OS assigns a ID for each object in a window.
Index - It depends upon the tool. Mostly tools are identifying based on similar objects.
Location - Identifying object by X & Y Co-ordinates.
Properties - Sometimes all above are not useful to identify the object uniquely. At that time, user should try that object properties.

No comments: