当前位置: 首页 > 工具软件 > LDTP > 使用案例 >

LDTP(Linux Desktop Test Project)摘要

步致远
2023-12-01

Install the following dependency packages

python-atspi or relevant name in your distribution

twisted-web or relevant name in your distribution

python-gnome or relevant name in your distribution

Optional packages

• Import tool of ImageMagick - To capture a screenshot

Python Imaging Library - Compare images, black out a region in animage

pystatgrab - CPU / Memory utilization monitoring library

Window:

window types:

1. Frame (frm)

2. Dialog (dlg)

3. Alert (dlg)

4. Font Chooser (dlg)

5. File Chooser (dlg)

6. Window (This type in general does nothave any associated title, so we need to represent them using index - dlg)

Glob pattern support

Window name can be clubbed with globpatterns (* or ?)

Different ways of representing window name

1. Window type and window title (Ex:'frmUnsavedDocument1-gedit')

2. Window title (Ex: 'Unsaved Document 1 -gedit')

3. Window type, glob expression and partialwindow title (Ex: 'frm*-gedit')

4. Glob pattern and partial window title(Ex: '*-gedit')

5. Window type, partial window title andglob pattern (Ex: 'frmUnsavedDocument1*')

6. Window type, window title and index (Iftwo windows of same title exist at same time. Ex:

First window name 'dlgAppoinment', Secondwindow name 'dlgAppoinment1')

7. Window type and index (only if windowdoes not have any accessible title, Ex: 'dlg0')


Window name formats

If window label contains space or new linecharacters, they will be stripped.

Object:

Label

In general menu / menu item / push button /toggle button type controls can be accessed through its label.

Label by / Label for (associated label)

In general text / tables / check box /radio button / spin button / combo box controls can be accessed using theassociated label only.

Object name with out label / associatedlabel accessing via index

If a control does not have any label orassociated label, then it can be accessed using index.

Object name with index

In some cases, a control type can bepresent in multiple places in the same window and chances that it may have same label too in that case, thefirst control can be accessed just with the default notation, but the second control and further can beaccessed with the format control type, label or associated label

and index starting from 1.

Object name formats

If object labelor associated label contains space, dot, colon, under score or new linecharacters, they will be stripped.                           

 

Callback – On new window creation

Register a callback event, when a window with given title is created. Glob type pattern can be given as title name.

 

Class keywords convention used in appmap

ACCEL_LABEL

ALERT dlg

ANIMATION

ARROW

CALENDAR cal

CANVAS cnvs

CHECK_BOX chk

CHECK_MENU_ITEM mnu

COLOR_CHOOSER

COLUMN_HEADER

COMBO_BOX cbo

DATE_EDITOR

DESKTOP_ICON

DESKTOP_FRAME frm

DIAL dial

DIALOG dlg

DIRECTORY_PANE

DRAWING_AREA dwg

FILE_CHOOSER dlg

FILLER flr

FONT_CHOOSER dlg

FRAME frm

GLASS_PANE

HTML_CONTAINER html

ICON ico

IMAGE img

INTERNAL_FRAME

LABEL lbl

LAYERED_PANE pane

LIST lst

LIST_ITEM lsti

MENU mnu

MENU_BAR mbar

MENU_ITEM mnu

OPTION_PANE opan

PAGE_TAB ptab

PAGE_TAB_LIST ptl

PANEL pnl

PASSWORD_TEXT txt

POPUP_MENU pop

PROGRESS_BAR pbar

PUSH_BUTTON btn

RADIO_BUTTON rbtn

RADIO_MENU_ITEM mnu

ROOT_PANE rpan

ROW_HEADER rhdr

SCROLL_BAR scbr

SCROLL_PANE scpn

SEPARATOR sep

SLIDER sldr

SPIN_BUTTON sbtn

SPLIT_PANE splt

STATUS_BAR stat

TABLE tbl

Linux Desktop Testing Project - LDTP

TABLE_CELL tbl

TABLE_COLUMN_HEADER tch

TABLE_ROW_HEADER trh

TEAROFF_MENU_ITEM tmi

TERMINAL term

TEXT txt

TOGGLE_BUTTON tbtn

TOOL_BAR tbar

TOOL_TIP ttip

TREE tree

TREE_TABLE ttbl

UNKNOWN unk

VIEWPORT view

WINDOW dlg

EXTENDED

HEADER hdr

FOOTER foot

PARAGRAPH para

RULER rul

APPLICATION app

AUTOCOMPLETE txt

CALENDARVIEW cal

CALENDAREVENT cal

EDITBAR txt

ENTRY txt

 类似资料: