About Appmap

From LDTP

NOTE: This site is no longer maintained, Please visit http://ldtp.freedesktop.org for latest updates

We will take an example application - gedit. Let us generate appmap for gedit in US - English language. So that, we can start writing all the required test-scripts based on the generated appmap with all possible test scenarios.

snip of gedit appmap

[gedit]

gedit={class=frame, app_name=gedit}

mnuFile={class=menu, label=File}

mnuNew={class=menu_item, label=New}

gedit appmap snip ends

A small description: Here left hand side (before = symbol), will be used in test scripts. Text mentioned within '[]' symbol refers a dialog or frame or alert window. Class type refers the object type (like frame, dialog, alert, menu, menu_item, radio_menu_item, check_box, push_button, etc - Refer class keywords). app_name will have the application binary name. label field will have the actual string visible to the user. There are some more types available in appmap (like label_by, instance_index, relevant_index, parent, state}

To open new file in gedit we need to select File menu and then New menu item. So, to do this with LDTP, the python script will look like:

selectmenuitem ('gedit', 'mnuFile;mnuNew')

A small description: selectmenuitem in gedit window (which is of type frame - refer gedit appmap (http://forge.novell.com/modules/xfmod/cvs/cvsbrowse.php/ldtp/pyautosuite/gedit/gedit.map)). So, the selection mechanism will be something like File menu will be selected first and New menu item will be selected next.

Reference

class - class keywords

app_name

parent

state

label

label_by

Appmap generation

appmap convention