The GUI Map
GUI Map is a
repository of information created by WinRunner where it will store
information about the GUI elements in our app like buttons, textboxes,
menus, windows etc. Each GUI object has some properties like height,
width, back color, class name. Etc. Some of these properties are used
by WinRunner to identify the objects.
When the GUI map is
created WinRunner tries to identify each object uniquely using minimum
possible properties as stores it in the map. Each object is also
assigned a unique name. These names are used through out the script for
identifying the objects.
For each object there are some
properties called obligatory and some as optional. Whenever identifying
the object WinRunner definitely records the obligatory properties and
uses them to identify it. It will record optional properties only when
the obligatory properties are unable to identify the object uniquely. Any
test written on the same application can use the same map file. This
also simplifies maintenance. If perchance the interface changes we just
need to update the map and the tests are ready for the new version.
Class: A class is a type of GUI object, which has a certain properties and behavior.
Class Name: A name each class has and is identified with.
Predefined classes:
These are classes that are native to WinRunner. It understands all
their properties automatically, e.g. push_button, edit, list,
check_button, syslistview etc. It also has one generic class Object.
WinRunner recognizes any GUI element as Object if it is unable to map
it to any predefined classes.
Custom classes:
These are classes, which cannot be recognized by WinRunner. These are
called custom classes or user-defined classes. These are mapped to
Object class by default. We can map it to some other predefined class
by using the GUI map configuration tool.
GUI maps can be created and modified by using the GUI Map Editor Tool. GUI Spy
This
used literally spy on other applications and try to learn properties of
the objects. To spy, click on Tools ->GUI Spy. Click on the hand
icon and point to the object you want to spy. In the spy’s window you
can see the properties and their values. You can select view either all
the properties or only recorded properties. This can be used to know if
WinRunner recognizes a particular GUI element.
|