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, 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). 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

About_Appmap (last edited 2010-02-21 19:22:15 by localhost)