Obsolete
Using this tool you can generate application map which will be recognized by ldtp.
How to use this tool ?
- Ensure accessibility is turned on
- Open the application for which you want to generate appmap.
- Run appmap. Syntax:
appmap <application>
Note: The application map will be stored in the current directory, i.e. the directory from where you execute the commandappmap <application>
Example:
- Open gedit
appmap gedit An application map called "gedit.map" will be generated in the current directory. Note: Some GUI objects/applications may note be recognized by appmap - in this case you will need to complete the following steps in order to generate an application map for these GUI objects / applications
- Launch the component for which test automation has to be done. - Launch at-poke from terminal, select the component and then click on 'Poke'. - Then click on 'Expand' in 'A tool for poking things'. Note: If you find that at-poke is not capturing the application this is probably because you have not enabled accessibility.
- Scroll down and click on each of the objects in 'A tool for poking things'. You will be able to identify details of object you are looking for on right hand side, that will display object type, label associated with the object.
- To specify in the appmap capture object type, label of the object, if label is not associated with the object then you need to find out instance index. Instance index is position of the 'X' type of object under parent. If object 'Y' of type 'Z' is existing under parent 'X' first, then instance_index is 'Zero'. If object 'Y' of type 'Z' is existing under parent 'X' second, then instance_index is '1'. The example given below might make things more clear.
- Open Gedit, click on Edit->Preferences.
- In the Edit Preferences dialog box there are 3 spin button items, 'Tabs width', 'Autosave files every' and 'Undo Limit to'. The instance index for 'Tabs width' is 0, the instance index for 'Autosave files every' is 1 and instance index for 'Undo Limit to' is 2.
- The syntax for these GUI objects can be written in the appmap as follows: * sbtnTabs={class=spinbutton, instance_index=0}_ * sbtnAutosave={class=spinbutton, instance_index=1}_ * sbtnUndo={class=spinbutton, instance_index=2}_ - Edit application map file generated by appmap, specify object name which follows naming conventions of object, type of object, label instance index. - Once the application map for a particular application is complete, it is in the appmap directory with the extension .map (for example application map for gedit is gedit.map). Copy the appmap of that application and save it in the input directory. More details about internals of appmap refer ?About Appmap