2
* Linux Desktop Testing Project http://ldtp.freedesktop.org/
5
* Nagappan Alagappan <nagappan@gmail.com>
6
* Premkumar J <prem.jothimani@gmail.com>
8
* Copyright 2004 - 2007 Novell, Inc.
9
* Copyright 2008 - 2009 Nagappan Alagappan
11
* Permission is granted to copy, distribute and/or modify this document
12
* under the terms of the GNU Lesser General Public License, Version 2
13
* or any later version published by the Free Software Foundation;
14
* with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
15
* A copy of the license is included in the section entitled "GNU
16
* Lesser General Public License".
18
* You should have received a copy of the GNU GNU Lesser General Public
19
* License along with this documentation; if not, write to the
20
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
* Boston, MA 02111-1307, USA.
24
/** \mainpage LDTP User manual
26
* \section AboutLDTP About LDTP
28
* Linux Desktop Testing Project (LDTP) is aimed at producing high
29
* quality test automation framework and cutting-edge tools that can
30
* be used to test Linux Desktop and improve it. It uses the
31
* Accessibility libraries to poke through the application's user
32
* interface. The framework also has tools to record test-cases based
33
* on user-selection on the application. For more information check
34
* our site - http://ldtp.freedesktop.org
36
* \section scriptwritter Components list
38
* <TABLE align=left border=0 cellpadding=10 cellspacing=0>
44
* \subpage calendarview
50
* \subpage checkmenuitem
56
* \subpage embeddedcomponent
73
* \subpage layeredpane
87
* \subpage pagetablist
93
* \subpage ProcessStatistics
101
* \subpage radiobutton
104
* \subpage radiomenuitem
113
* \subpage spinbutton
127
* \subpage togglebutton
146
* <a><img HEIGHT="30" src="../ldtp-logo-small.png" style="float:center;center:0px;top:0px;position:absolute;" alt="Linux Desktop Testing Project"/></a>
150
/** \page calendar calendar
151
* \section CalendarSection About Calendar functions
153
* To operate on a calendar object and based on your requirement, you can use any of these functions
155
* \section CalendarAPI Calendar python API's
156
* \subpage selectcalendardate - Select the given date in a calendar object
160
/** \page calendarview calendarview
161
* \section CalendarViewSection About Calendar view functions
163
* To operate on a calendar view object and based on your requirement, you can use any of these functions
165
* \section CalendarViewAPI Calendar View python API's
166
* \subpage enterstring - Generate keyboard events as if the user
170
* \subpage selectevent - Select the calendar event based on event name
173
* \subpage selecteventindex - Select the calendar event based on event index
176
* \subpage verifyeventexist - Verify whether the calendar event exist
181
/** \page checkbox checkbox
182
* \section CheckboxSection About Checkbox functions
184
* To operate on a check box object and based on your requirement, you can use any of these functions
186
* \section CheckboxAPI Checkbox python API's
188
* \subpage check - Tick the check box
191
* \subpage click - Click on the check box
194
* \subpage stateenabled - Checks whether the check box is in enabled state or not
197
* \subpage uncheck - Un tick the check box
200
* \subpage verifycheck - Verify whether the check box is ticked
203
* \subpage verifyuncheck - Verify whether the check box is unticked
207
/** \page checkmenuitem checkmenuitem
208
* \section CheckmenuitemSection About Checkmenuitem functions
210
* To operate on a check menuitem object and based on your requirement, you can use any of these functions
212
* \section CheckmenuitemAPI Checkmenuitem python API's
214
* \subpage click - Click on the check menu item
217
* \subpage menuitemenabled - Verify whether the check menu item is enabled
220
* \subpage menucheck - Tick the menu item
223
* \subpage menuuncheck - Un tick the menu item
226
* \subpage selectmenuitem - Select the menu item
229
* \subpage verifymenucheck - Verify whether the check menu item is ticked
232
* \subpage verifymenuuncheck - Verify whether the check menu item is unticked
236
/** \page combobox combobox
237
* \section ComboboxSection About Combobox functions
239
* To operate on a combobox object and based on your requirement, you can use any of these functions
241
* \section ComboboxAPI Combobox python API's
243
* \subpage capturetofile - Get the entires of list box and dump it to
247
* \subpage click - Click on a combo box
250
* \subpage comboselect - Select an item from the combo box list or
251
* menu item based on name
254
* \subpage comboselectindex - Select an item from the combo box list or
255
* menu item based on index
258
* \subpage hidelist - Hide the combo box drop down list
261
* \subpage selectindex - Select combo box item based on index
264
* \subpage settextvalue - Set a text in the combo box list
267
* \subpage showlist - Show the combo box drop down list
270
* \subpage verifydropdown - Verify whether the drop down list pops up
273
* \subpage verifyhidelist - Verify whether the drop down list is in
277
* \subpage verifyselect - Verify whether the item is selected in the
281
* \subpage verifysettext - Verify whether the text set is available
284
* \subpage verifyshowlist - Verify whether the drop down list is
289
/** \page general general
290
* \section GeneralSection About General functions
292
* General ldtp functions. Based on your requirement, you can use any of these functions
294
* \section GeneralAPI General python API's
296
* \subpage appundertest - Application under test
299
* \subpage bindtext - Bind text to the current application and current locale
302
* \subpage generatekeyevent - Generate keyboard event on currently
306
* \subpage generatemouseevent - Generate mouse event based on x, y coordinates
309
* \subpage getallstates - Get list of available states of an object
312
* \subpage hasstate - Checks whether the object has a state
315
* \subpage initappmap - Initialize application map
318
* \subpage keypress - Generate keyboard press event
321
* \subpage keyrelease - Generate keyboard press event
324
* \subpage launchapp - Launch application
327
* \subpage launchapp2 - Launch application
330
* \subpage reinitldtp - Reinitialize LDTP
333
* \subpage releasecontext - Release the context information
336
* \subpage remap - Force remap the window information
339
* \subpage setcontext - Set the context information
342
* \subpage setlocale - Set locale to given locale
345
* \subpage stopscriptengine - Stop LDTP script engine
348
* \subpage wait - Suspend the operation for specified duration
352
/** \page imaging imaging
353
* \section ImagingSection About Imaging functions
355
* To manipulate with image processing and based on your requirement, you can use any of these functions
357
* \section ImagingAPI Imaging python API's
359
* \subpage blackoutregion - Black out the specified region in the image
362
* \subpage imagecapture - Capture the screen shot of a window
365
* \subpage imagecompare - Compare two images
369
/** \page label label
370
* \section LabelSection About Label functions
372
* To operate on a label object and based on your requirement, you can use any of these functions
374
* \section LabelAPI Label python API's
376
* \subpage getlabel - Get label of an object
379
* \subpage getlabelatindex - Get label at the specified index in a window
382
* \subpage selectlabelspanelbyname - Select the labels based on panel name
386
/** \page layeredpane layeredpane
387
* \section LayeredpaneSection About Layeredpane functions
389
* To operate on a layered pane object and based on your requirement, you can use any of these functions
391
* \section LayeredpaneAPI Layeredpane python API's
393
* \subpage ischildindexselected - Is child selected in the complete
394
* list based on index
397
* \subpage ischilditemselected - Is child item selected in the
398
* selected list based on name from the previously selected list
401
* \subpage ischilditemindexselected - Is child item selected in the
402
* selected list based on index from the previously selected list
405
* \subpage ischildselected - Is child selected in the complete list
409
* \subpage rightclick - Generate right click event
412
* \subpage selectall - Select all the item
415
* \subpage selectindex - Select item based on index
418
* \subpage selectitem - Select an item
421
* \subpage selecteditemcount - Selected item count
424
* \subpage unselectall - Unselect all the item
427
* \subpage unselectindex - Unselect item based on index
430
* \subpage unselectitem - Unselect an item
433
* \subpage unselectitemindex - Unselect item based on index from the
439
* \section ListSection About List functions
441
* To operate on a list object and based on your requirement, you can use any of these functions
443
* \section ListAPI List python API's
445
* \subpage selecttextitem - Select the item in the list based on name
448
* \subpage selectindex - Select the item in the list based on index
452
/** \page logging logging
453
* \section LoggingSection About Logging functions
455
* Log functions are used to log the operations performed. Output format of log file is XML file
457
* \section LoggingAPI Logging python API's
459
* \subpage addlogger - Add more logging handler
462
* \subpage ldtplog - Log the operations in LDTP engine side
465
* \subpage log - Log the operations
468
* \subpage setloglevel - Set the level of logging
471
* \subpage startldtplog - Start LDTP engine logging to a file
474
* \subpage startlog - Start logging to a file
477
* \subpage stopldtplog - Stop LDTP engine logging to a file
480
* \subpage stoplog - Stop logging to a file
484
/** \page menuitem menuitem
485
* \section MenuitemSection About Menuitem functions
487
* To operate on a menuitem object and based on your requirement, you can use any of these functions
489
* \section MenuitemAPI Menuitem python API's
491
* \subpage click - Click on the menu item
494
* \subpage doesmenuitemexist - Check whether a menu item exist
497
* \subpage invokemenu - Invoke a menu in embedded component
500
* \subpage listsubmenus - Get list of menu items under a menu
503
* \subpage selectmenuitem - Select the given menu item
507
/** \page panel panel
508
* \section PanelSection About Panel functions
510
* To operate on a panel object and based on your requirement, you can use any of these functions
512
* \section PanelAPI Panel python API's
514
* \subpage getpanelchildcount - Get the number of children under a panel
517
* \subpage selectpanel - Select panel based on index
520
* \subpage selectpanelname - Select panel based on name
524
/** \page ProcessStatistics ProcessStatistics
525
* \section ProcessStatisticsSection About Process Statistics functions
527
* To monitor the CPU and memory utilization you can use this class
529
* \section ProcessStatisticsAPI Process Statistics python API's
531
* \subpage Classpstats - Python class to monitor CPU / Memory utilization
535
/** \page pushbutton pushbutton
536
* \section PushbuttonSection About Pushbutton functions
538
* To operate on a push button object and based on your requirement, you can use any of these functions
540
* \section PushbuttonAPI Pushbutton python API's
542
* \subpage click - Generates mouse left click event on the object
545
* \subpage mouseleftclick - Generate mouse left click event
548
* \subpage stateenabled - Checks whether the push button is in
552
* \subpage verifypushbutton - Verify whether the object is a push button
556
/** \page radiobutton radiobutton
557
* \section RadiobuttonSection About Radiobutton functions
559
* To operate on a radio button object and based on your requirement, you can use any of these functions
561
* \section RadiobuttonAPI Radiobutton python API's
563
* \subpage click - Click on a radio button
566
* \subpage check - Select the radio button
569
* \subpage stateenabled - Checks whether the radio button is in
570
* enabled state or not
573
* \subpage verifycheck - Verify whether the radio button is selected
576
* \subpage verifyuncheck - Verify whether the radio button is deselected
580
/** \page radiomenuitem radiomenuitem
581
* \section RadiomenuitemSection About Radiomenuitem functions
583
* To operate on a radio menuitem object and based on your requirement, you can use any of these functions
585
* \section RadiomenuitemAPI Radiomenuitem python API's
587
* \subpage click - Click on a radio menu item
590
* \subpage menuitemenabled - Verify whether the radio menu item is enabled
593
* \subpage menucheck - Select the radio menu item
596
* \subpage selectmenuitem - Select the radio menu item
599
* \subpage verifymenucheck - Verify whether the radio menu item is selected
602
* \subpage verifymenuuncheck - Verify whether the radio menu item is deselected
606
/** \page scrollbar scrollbar
607
* \section ScrollbarSection About Scrollbar functions
609
* To operate on a scrollbar object and based on your requirement, you can use any of these functions
611
* \section ScrollbarAPI Scrollbar python API's
613
* \subpage onedown - Scroll down one time
616
* \subpage oneleft - Scroll left one time
619
* \subpage oneright - Scroll right one time
622
* \subpage oneup - Scroll up one time
625
* \subpage scrolldown - Scroll down
628
* \subpage scrollleft - Scroll left
631
* \subpage scrollright - Scroll right
634
* \subpage scrollup - Scroll up
637
* \subpage verifyscrollbar - Verify whether the object is scroll bar
640
* \subpage verifyscrollbarhorizontal - Verify whether the object is
641
* horizontal scroll bar
644
* \subpage verifyscrollbarvertical - Verify whether the object is
645
* vertical scroll bar
649
/** \page slider slider
650
* \section SliderSection About Slider functions
652
* To operate on a slider object and based on your requirement, you can use any of these functions
654
* \section SliderAPI Slider python API's
656
* \subpage decrease - Decrease the slider
659
* \subpage getminincrement - Get min increment value of slider
662
* \subpage getslidervalue - Get the slider value
665
* \subpage increase - Increase the slider
668
* \subpage setmax - Set the slider to max value
671
* \subpage setmin - Set the slider to min value
674
* \subpage verifyslider - Verify whether the object is slider
677
* \subpage verifysliderhorizontal - Verify whether the object is
681
* \subpage verifyslidervertical - Verify whether the object is
686
/** \page spinbutton spinbutton
687
* \section SpinbuttonSection About Spinbutton functions
689
* To operate on a spin button object and based on your requirement, you can use any of these functions
691
* \section SpinbuttonAPI Spinbutton python API's
693
* \subpage getvalue - Get value from spin button
696
* \subpage getmaxvalue - Get max value of spin button
699
* \subpage getminincrement - Get min increment value of spin button
702
* \subpage getminvalue - Get min value of spin button
705
* \subpage setvalue - Set value in spin button
708
* \subpage verifysetvalue - Verify the value of spin button with the
713
/** \page pagetablist pagetablist
714
* \section PagetabSection About Pagetab functions
716
* To operate on a page tab object and based on your requirement, you can use any of these functions
718
* \section PagetabAPI Pagetab python API's
720
* \subpage gettabcount - Get number of tabs in a page tab list
723
* \subpage gettabname - Get name of a tab in the page tab list
726
* \subpage selecttab - Select tab based on tab name
729
* \subpage selecttabindex - Select tab based on tab index
733
/** \page statusbar statusbar
734
* \section StatusbarSection About Statusbar functions
736
* To operate on a status bar object and based on your requirement, you can use any of these functions
738
* \section PagetabAPI Pagetab python API's
740
* \subpage getstatusbartext - Get text displayed in status bar
743
* \subpage verifystatusbar - Verify the status bar text with the
747
* \subpage verifystatusbarvisible - Verify whether the status bar
752
/** \page table table
753
* \section TableSection About Table functions
755
* To operate on a table object and based on your requirement, you can use any of these functions
757
* \section TableAPI Table python API's
759
* \subpage checkrow - Tick the table cell row of type toggle button
762
* \subpage doesrowexist - Checks whether the row with the given name exist
765
* \subpage doubleclick - Generate double click event on the component
768
* \subpage doubleclickrow - Generate double click event on the row
769
* with matches the given name
772
* \subpage getcellvalue - Get the table cell value
775
* \subpage getrowcount - Get the rows count
778
* \subpage gettablerowindex - Get the index of the row, where the
782
* \subpage selectlastrow - Select last row in the table
785
* \subpage selectrow - Select a row with the given name
788
* \subpage selectrowindex - Select a row with an index
791
* \subpage selectrowpartialmatch - Select a row with the given
795
* \subpage setcellvalue - Set the table cell value with the given value
798
* \subpage singleclickrow - Generate single click event on the row
799
* with matches the given name
802
* \subpage sortcolumn - Sort the column based on the given field name
805
* \subpage sortcolumnindex - Sort the column based on the given field index
808
* \subpage uncheckrow - Un check the table cell of type toggle button
811
* \subpage verifytablecell - Verify whether the cell value is same as
815
* \subpage verifypartialtablecell - Verify whether the cell value
816
* partially matches the given value
821
* \section TextSection About Text functions
823
* To operate on a text object and based on your requirement, you can use any of these functions
825
* \section TextAPI Text python API's
827
* \subpage activatetext - Activate the text
830
* \subpage appendtext - Append the given text to the existing text
833
* \subpage comparetextproperty - Checks the availability of all the given text property
836
* \subpage containstextproperty - Checks the availability of one given text property
839
* \subpage copytext - Copy text to clipboard
842
* \subpage cuttext - Cut the text
845
* \subpage deletetext - Deletes the text
848
* \subpage enterstring - Genereate keyboard events as if user key-ins
851
* \subpage getcharcount - Get the number of characters present in a
855
* \subpage getcursorposition - Get the current cursor position
858
* \subpage gettextproperty - Get the properties of text
861
* \subpage gettextvalue - Get the text content
864
* \subpage grabfocus - Grab the focus
867
* \subpage inserttext - Insert a text in specified location
870
* \subpage istextstateenabled - Verify whether the text field is enabled
873
* \subpage mouseleftclick - Generate mouse left click event
876
* \subpage mouserightclick - Generate mouse right click event
879
* \subpage mousemove - Simulate mouse move event
882
* \subpage pastetext - Paste the text from clip board to the text area
885
* \subpage rightclick - Generate right click event
888
* \subpage selecttextbyindexandregion - Select text by index and region
891
* \subpage selecttextbyname - Select text by the given name
894
* \subpage setcursorposition - Move the cursor position to the
898
* \subpage settextvalue - Sets the text value in the text field
901
* \subpage verifypartialmatch - Verify whether the given text
902
* partially matches with the existing text
905
* \subpage verifysettext - Verify whether the given text is same as
906
* the text available in the text field
910
/** \page togglebutton togglebutton
911
* \section TogglebuttonSection About Togglebutton functions
913
* To operate on a toggle object and based on your requirement, you can use any of these functions
915
* \section TogglebuttonAPI Togglebutton python API's
917
* \subpage click - Click on a toggle button
920
* \subpage enterstring - Generate keyboard event as if user keys-in
923
* \subpage press - Toggle's the button state
926
* \subpage stateenabled - Checks whether the toggle button is in
927
* enabled state or not
930
* \subpage verifytoggled - Verify whether the button is in toggled state
934
/** \page embeddedcomponent embeddedcomponent
935
* \section EmbeddedcomponentSection About Embeddedcomponent functions
937
* To operate on a embedded component (accessible) object and based on your requirement, you can use any of these functions
939
* \section EmbeddedcomponentAPI Embeddedcomponent python API's
941
* \subpage click - Click on an embedded component object
944
* \subpage enterstring - Generate keyboard event as if user keys-in
947
* \subpage invokemenu - Invokes the menu in an embedded component object
950
* \subpage rightclick - Right clicks on an embedded component object
954
/** \page toolbar toolbar
955
* \section ToolbarSection About Toolbar functions
957
* To operate on a toolbar object and based on your requirement, you can use any of these functions
959
* \section ToolbarAPI Toolbar python API's
961
* \subpage verifybuttoncount - Verify the number of buttons matches
962
* with the given button count
965
* \subpage verifyvisiblebuttoncount - Verify the visible number of
966
* buttons matches the given button count
970
/** \page treetable treetable
971
* \section TreetableSection About Treetable functions
973
* To operate on a tree table object and based on your requirement, you can use any of these functions
975
* \section TreetableAPI Treetable python API's
977
* \subpage checkrow - Tick the table cell row of type toggle button
980
* \subpage doesrowexist - Checks whether the row with the given name exist
983
* \subpage doubleclick - Generate double click event on the component
986
* \subpage doubleclickrow - Generate double click event on the row
987
* which matches the given name
990
* \subpage doubleclickrowindex - Generate double click event on the row
991
* which matches the given index
994
* \subpage expandtablecell - Expand or collapse tree table
997
* \subpage getcellvalue - Get the table cell value
1000
* \subpage getrowcount - Get the rows count
1003
* \subpage gettreetablerowindex - Get the index of the row, where the
1004
* given name matches
1007
* \subpage rightclick - Generate right click event
1010
* \subpage selectlastrow - Select last row in the table
1013
* \subpage selectrow - Select a row with the given name
1016
* \subpage selectrowindex - Select a row with an index
1019
* \subpage selectrowpartialmatch - Select a row with the given
1023
* \subpage setcellvalue - Set the table cell value with the given value
1026
* \subpage singleclickrow - Generate single click event on the row
1027
* with matches the given name
1030
* \subpage sortcolumn - Sort the column based on the given field name
1033
* \subpage sortcolumnindex - Sort the column based on the given field index
1036
* \subpage uncheckrow - Un check the table cell of type toggle button
1039
* \subpage verifycheckrow - Verify whether the table cell of type
1040
* toggle button is ticked
1043
* \subpage verifytablecell - Verify whether the cell value is same as
1047
* \subpage verifypartialtablecell - Verify whether the cell value
1048
* partially matches the given value
1051
* \subpage verifyuncheckrow - Verify whether the table cell of type
1052
* toggle button is un-ticked
1056
/** \page Window Window functions
1057
* \section WindowSection About Window functions
1059
* Window based functions
1063
* \section WindowAPI Window python API's
1065
* \subpage activatewindow - Activate the given window name or all
1069
* \subpage closewindow - Close the given window name or all
1073
* \subpage getapplist - Get list of accessibility enabled applications
1076
* \subpage getchild - Get child object of a window which matches label or role name or both
1079
* \subpage getobjectinfo - Get list of available property classes of an object
1082
* \subpage getobjectlist - Get list of objects in a window
1085
* \subpage getobjectproperty - Get a class (label, type) property of an object
1088
* \subpage getwindowlist - Get current list of window titles
1091
* \subpage getwindowsize - Get size of the given window title
1094
* \subpage getobjectsize - Get size of the given object
1097
* \subpage guiexist - Checks whether a window exist
1100
* \subpage guitimeout - Modifies the global gui timeout period
1103
* \subpage maximizewindow - Maximize the given window name or all
1107
* \subpage minimizewindow - Minimize the given window name or all
1111
* \subpage objectexist - To check whether a component exist in a given window
1114
* \subpage objtimeout - Modifies the global object timeout period
1117
* \subpage onwindowcreate - Register callback function to be called
1118
* when the specified window is created
1121
* \subpage removecallback - Remove the registered callback function using onwindowcreate
1124
* \subpage waittillguiexist - Suspend the operation till the window exist
1127
* \subpage waittillguinotexist - Suspend the operation till the
1132
/** \page LTFX LTFX functions
1133
* \section LTFXSection About LTFX functions
1135
* To operate on an window in which accessibility is not enabled we
1136
* use external application Linux Test For X (In short LTFX) -
1137
* http://sf.net/projects/ltfx
1140
* \section LTFXAPI LTFX python API's
1142
* \subpage activatewin - Activate the window with the given title
1145
* \subpage activatewinpartialname - Activate the window with the
1146
* given partial title
1149
* \subpage getactivewin - Get the window title thats currently in focus
1152
* \subpage partialexists - Check the window whether it exist based on
1153
* the partial given title
1156
* \subpage typekey - Generate keyboard events as if user key in
1159
* \subpage waitwinname - Wait for window to appear with the given title
1162
* \subpage waitwinpartialname - Wait for window to appear with the
1163
* given partial title
1166
* \subpage windowexists - Check the window whether it exist based on
1170
* \section LTFXAssumptions Assumptions
1172
* LTFX functions assumes that the window to be operated is in
1173
* focus. It directly generates the X key board events. It does not
1174
* know whether the object exist or the operation is successfully
1180
* \section IconSection About Icon functions
1182
* To operate on an icon object
1184
* \section IconAPI Icon python API's
1186
* \subpage rightclick - Generate right click event
1191
* \page initappmap initappmap
1194
* initappmap ('\<application map name\>')
1196
* \section Description
1198
* Application map will be loaded
1201
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
1202
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/appmap.c
1206
* from ldtp import *
1208
* initappmap ('nautilus.map')
1210
* \author Nagappan Alagappan <nagappan@gmail.com>
1214
* \page guiexist guiexist
1217
* guiexist ('\<window name\>'[, \<object name\>])
1219
* \section Description
1221
* If the given window name exist, this function returns 1. If window doesnot exist, then this function returns 0.
1223
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
1225
* \section ImplementationDetails
1227
* \retval 1 on success and 0 on no existing window
1231
* With respect to gedit Open dialog
1233
* from ldtp import *
1235
* # if GTK File selector is opened the following function will return 1, else 0
1237
* guiexist ('dlgOpenFile...')
1239
* guiexist ('dlgOpenFile...', 'btnOpen') # Returns 1, If window exist and also the object exist
1241
* guiexist ('dlgOpenFile...', 'btnabc') # Returns 0
1243
* \author Nagappan Alagappan <nagappan@gmail.com>
1247
* \page waittillguiexist waittillguiexist
1250
* waittillguiexist ('\<window name\>'[, '\<component name\>'[, guiTimeOut]])
1252
* \section Description
1254
* If the given window name exist, this function returns 1. If window doesnot exist, then this function returns 0. Difference between \ref guiexist and waitguiexist is, waitguiexist waits for maximum 30 seconds. Still the window doesn't appear, then 0 is returned. We can set the environment variable 'GUI_TIMEOUT' to change the default waiting time. We can wait for component also and its an optional argument. The default value of guiTimeOut is None and it can be changed either by environment variable or by passing an integer argument > 0. This timeout will be for this specific window and it will not affect the global default time out settings. If you want to change the global default time out settings use guitimeout or objtimeout function appropriately.
1256
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
1258
* \retval 1 on success, 0 otherwise
1262
* waittillguiexist ('dlgOpen')
1264
* This function will be useful, when some event is fired and after that if a new window is expected, we can use this function to wait for window to appear.
1266
* \author Nagappan Alagappan <nagappan@gmail.com>
1270
* \page waittillguinotexist waittillguinotexist
1273
* waittillguinotexist ('\<window name\>'[, '\<component name\>'[, guiTimeOut]])
1275
* \section Description
1277
* If the given window name does not exist, this function returns 1. If window exist, then this function returns 0. Difference between \ref guiexist and waitguinotexist is, waitguinotexist waits for maximum 30 seconds. Still the window does not disappear, then 0 is returned. We can set the environment variable 'GUI_TIMEOUT' to change the default waiting time. We can wait for component also and its an optional argument. The default value of guiTimeOut is None and it can be changed either by environment variable or by passing an integer argument > 0. This timeout will be for this specific window and it will not affect the global default time out settings. If you want to change the global default time out settings use guitimeout or objtimeout function appropriately.
1279
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
1281
* \retval 1 on success, 0 otherwise
1285
* waittillguinotexist ('dlgOpen')
1287
* This function will be useful, when some event is fired and after that if an existing window should close, we can use this function to wait till the window closes.
1289
* \author Nagappan Alagappan <nagappan@gmail.com>
1296
* log ('\<Message to be logged\>', '\<tag\>')
1298
* where tag can be any of these
1302
* messages can be logged while executing in debug mode
1304
* \subsection warning
1306
* warning message can be logged
1308
* \subsection teststart
1310
* tag used to indicate the beginning of the test suite
1312
* \subsection testend
1314
* tag used to indicate the end of the test suite
1318
* tag used to indicate the beginning of test case
1322
* tag used at the end of the test case
1326
* error messages can be logged with this message
1330
* message will be logged on successful execution of the testcases
1334
* message will be logged on if execution of testcases fail
1336
* \note Messges for the Tags teststart and testend should not contain spaces in between
1338
* begin and end: These keywords are to be used with the same logging message and at beginning and end of testscripts
1340
* teststart and testend: These keywords are to be used with the same logging message and at the beginning and end of testcases
1342
* \section Description
1344
* Logs the message in the log.xml with the tag which can be viewed after the execution of scripts
1346
* \section ImplementationDetails
1348
* The required message will be logged into the log.xml on execution of scripts
1350
* \retval 1 on success and 0 on error
1354
* With Respect to Evolution:
1356
* 1) log ('EvolutionSuite', 'begin')
1358
* execfile ('evolution.py')
1360
* log ('EvolutionSuite', 'end')
1362
* 2) With respect to Appointment-to check the checkbox,
1366
* selecttab('dlgAppointment-NoSummary', 'ptlAppointment-Nosummary', '1')
1368
* log ('Selecttab-In-Appointment', 'pass')
1374
* log ('Selecttab','fail')
1376
* 3) With respect to creation of vFolders
1378
* log ('Creation-of-vFolders', 'teststart')
1382
* log ('Creation-of-vFolders', 'testend')
1384
* 4) Log message showing success of some test case
1386
* from ldtp import *
1388
* You can log the message to start the test case before writing the test case as
1390
* log ('Open a file', 'teststart')
1392
* log ('opening a file', 'pass')
1394
* \author Nagashree <mnagashree@novell.com>
1398
* \page ldtplog ldtplog
1401
* ldtplog ('\<Message to be logged\>', '\<tag\>')
1403
* where tag can be any of these
1407
* messages can be logged while executing in debug mode
1409
* \subsection warning
1411
* warning message can be logged
1413
* \subsection teststart
1415
* tag used to indicate the beginning of the test suite
1417
* \subsection testend
1419
* tag used to indicate the end of the test suite
1423
* tag used to indicate the beginning of test case
1427
* tag used at the end of the test case
1431
* error messages can be logged with this message
1435
* message will be logged on successful execution of the testcases
1439
* message will be logged on if execution of testcases fail
1441
* \note Messges for the Tags teststart and testend should not contain spaces in between
1443
* begin and end: These keywords are to be used with the same logging message and at beginning and end of testscripts
1445
* teststart and testend: These keywords are to be used with the same logging message and at the beginning and end of testcases
1447
* \section Description
1449
* Logs the message in the specified log file in LDTP engine side, with the tag which can be viewed after the execution of scripts
1451
* \section ImplementationDetails
1453
* The required message will be logged into the log.xml on execution of scripts
1455
* \retval 1 on success and 0 on error
1459
* With Respect to Evolution:
1461
* 1) ldtplog ('EvolutionSuite', 'begin')
1463
* execfile ('evolution.py')
1465
* ldtplog ('EvolutionSuite', 'end')
1467
* 2) With respect to Appointment-to check the checkbox,
1471
* selecttab('dlgAppointment-NoSummary', 'ptlAppointment-Nosummary', '1')
1473
* ldtplog ('Selecttab-In-Appointment', 'pass')
1479
* ldtplog ('Selecttab','fail')
1481
* 3) With respect to creation of vFolders
1483
* ldtplog ('Creation-of-vFolders', 'teststart')
1487
* ldtplog ('Creation-of-vFolders', 'testend')
1489
* 4) Log message showing success of some test case
1491
* from ldtp import *
1493
* You can log the message to start the test case before writing the test case as
1495
* ldtplog ('Open a file', 'teststart')
1497
* ldtplog ('opening a file', 'pass')
1499
* \author Nagashree <mnagashree@novell.com>
1503
* \page reinitldtp reinitldtp
1508
* \section Description
1510
* When we work with applications like nautilus, if we open a new window, the new window will not be recognized, until we close and open the session. In case of Mozilla Firefox also we could notice the same behaviour. Like opening Preference window, opening printer dialog etc.
1512
* \section ImplementationDetails
1514
* Closes the existing accessibility connection with at-spi-registryd and opens a new connection.
1516
* \retval 1 on success, LdtpExecutionError on failure
1518
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
1524
* \author Nagappan Alagappan <nagappan@gmail.com>
1531
* check ('\<window name\>', '\<component name\>')
1533
* \section Description
1535
* Check (tick) the check box state.
1537
* \section ImplementationDetails
1539
* \retval 1 if state is checked, else 0.
1541
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/check-box.c
1545
* from ldtp import *
1547
* For check menu item with respect to gedit menu
1549
* check ('gedit', 'mnuOutputWindow')
1551
* For check menu item with respect to gedit menu
1553
* check ('gedit', 'mnuToolbar')
1555
* For check box with respect to gedit preferences
1557
* check ('dlgPreferences', 'cboxEnableAutoIndentation')
1559
* \author Nagappan Alagappan <nagappan@gmail.com>
1560
* \author Khasim Shaheed <khasim.shaheed@gmail.com>
1563
/** \page uncheck uncheck
1566
* uncheck ('\<window name\>', '\<component name\>')
1568
* \section Description
1570
* Uncheck (un-tick) the check state.
1572
* \section ImplementationDetails
1574
* \retval 1 if state is unchecked, else 0.
1576
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/check-box.c
1580
* from ldtp import *
1582
* To uncheck menu item with respect to gedit menu
1584
* uncheck ('gedit', 'mnuOutputWindow')
1586
* For check menu item with respect to gedit menu
1588
* uncheck ('gedit', 'mnuToolbar')
1590
* To uncheck box with respect to gedit preferences
1592
* uncheck ('dlgPreferences', 'cboxEnableAutoIndentation')
1594
* \author Nagappan Alagappan <nagappan@gmail.com>
1597
/** \page click click
1600
* click ('\<window name\>', '\<component name\>')
1602
* \section Description
1604
* click on radio button / check box / push button/ combo box/ radio menu item/ toggle button/ radio button.
1606
* \section ImplementationDetails
1608
* \subsection Radio Radio Button
1610
* If radio button is already in checked state, then this function will uncheck (unset) it.
1612
* If radio button is already in unchecked state, then this function will check (set) it.
1614
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/radio-button.c
1616
* \subsection Check Check Box
1618
* If check box is already in checked state, then this function will uncheck (unset) it.
1620
* If check box is already in unchecked state, then this function will check (set) it.
1622
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/check-box.c
1624
* \subsection Push Push Button
1626
* If push button state is enabled, then click on the object.
1628
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/push-button.c
1630
* \subsection Toggle Toggle Button
1632
* Click on the toggle button.
1634
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/toggle-button.c
1636
* \subsection Combo Combo Box
1638
* Clicks on combo box, drop down list of combo box will be visible if not already else drop down list of combo box closes.
1640
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/combo-box.c
1644
* Example for push button (With respect to gedit open dialog)
1646
* click ('dlgOpen', 'btnOpen')
1648
* For Check box, Check menu item, on doing this action, the state will be toggled.
1650
* For Radio button, Radio menu item, if they are not already selected, they are selected, otherwise silently ignored.
1652
* \author Nagappan Alagappan <nagappan@gmail.com>
1655
/** \page verifycheck verifycheck
1658
* verifycheck ('\<window name\>', '\<component name\>')
1660
* \section Description
1662
* Checks the state of check box
1664
* \retval On check box state is checked returns 1, else 0.
1666
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/check-box.c
1670
* from ldtp import *
1672
* For check menu item with respect to gedit menu
1674
* verifycheck ('gedit', 'mnuView;mnOutputWindow')
1676
* For check box with respect to gedit preferences
1678
* verifycheck ('dlgPreferences', 'cboxEnableAutoIndentation')
1680
* \author Nagappan Alagappan <nagappan@gmail.com>
1681
* \author Aishwariya <aishwariyabhavan@yahoo.com>
1682
* \author Khasim Shaheed <khasim.shaheed@gmail.com>
1685
/** \page verifyuncheck verifyuncheck
1688
* verifyuncheck ('\<window name\>', '\<component name\>')
1690
* \section Description
1692
* Checks the state of check box.
1694
* \retval On check box state is un-checked returns 1, else 0.
1696
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/check-box.c
1700
* from ldtp import *
1702
* To verify uncheck menu item with respect to gedit menu
1704
* verifyuncheck ('gedit', 'mnuView;mnOutputWindow')
1706
* To verify uncheck box with respect to gedit preferences
1708
* verifyuncheck ('dlgPreferences', 'cboxEnableAutoIndentation')
1710
* \author Nagappan Alagappan <nagappan@gmail.com>
1711
* \author Khasim Shaheed <khasim.shaheed@gmail.com>
1714
/** \page menuitemenabled menuitemenabled
1717
* menuitemenabled ('\<window name\>', '\<menu item\>')
1719
* \section Description
1721
* Verify whether a menu is enabled or not
1723
* \retval 1 on success, 0 on failure
1725
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/menu-item.c
1729
* With respect to gedit, View menu and Toolbar check menuitem, we can verify whether the menu is enabled or not. If enabled 1 will be returned, else 0 will be returned.
1731
* menuitemenabled ('*-gedit', 'mnuView;mnuToolbar')
1733
* \author Nagappan Alagappan <nagappan@gmail.com>
1736
/** \page verifymenucheck verifymenucheck
1739
* verifymenucheck ('\<window name\>', '\<menu item\>')
1741
* \section Description
1743
* Verify whether a menu is checked or not
1745
* \retval 1 on success, 0 on failure
1747
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/check-menu-item.c
1751
* With respect to gedit, View menu and Toolbar check menuitem, we can verify whether the menu is checked or not. If checked 1 will be returned, else 0 will be returned.
1753
* verifymenucheck ('*-gedit', 'mnuView;mnuToolbar')
1755
* \author Nagappan Alagappan <nagappan@gmail.com>
1758
/** \page verifymenuuncheck verifymenuuncheck
1761
* verifymenuuncheck ('\<window name\>', '\<menu item\>')
1763
* \section Description
1765
* Verify whether a menu is unchecked or checked
1767
* \retval 1 on success, 0 on failure
1769
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/check-menu-item.c
1773
* With respect to gedit, View menu and Toolbar check menuitem, we can verify whether the menu is unchecked or not. If unchecked 1 will be returned, else 0 will be returned.
1775
* verifymenuuncheck ('*-gedit', 'mnuView;mnuToolbar')
1777
* \author Nagappan Alagappan <nagappan@gmail.com>
1780
/** \page menucheck menucheck
1783
* menucheck ('\<window name\>', '\<menu item\>')
1785
* \section Description
1787
* Checks a menu item, if its already checked it will be silently ignored
1789
* \retval 1 on success, LdtpExecutionError exception on failure
1791
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/check-menu-item.c
1795
* With respect to gedit, View menu and Toolbar check menuitem, we can check the menuitem. If its already checked, it will be silently ignored.
1797
* menucheck ('*-gedit', 'mnuView;mnuToolbar')
1799
* \author Nagappan Alagappan <nagappan@gmail.com>
1802
/** \page menuuncheck menuuncheck
1805
* menuuncheck ('\<window name\>', '\<menu item\>')
1807
* \section Description
1809
* Unchecks a menu item, if its already unchecked it will be silently ignored
1811
* \retval 1 on success, LdtpExecutionError exception on failure
1813
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/check-menu-item.c
1817
* With respect to gedit, View menu and Toolbar check menuitem, we can uncheck the menuitem. If its already unchecked, it will be silently ignored.
1819
* menuuncheck ('*-gedit', 'mnuView;mnuToolbar')
1821
* \author Nagappan Alagappan <nagappan@gmail.com>
1824
/** \page setcursorposition setcursorposition
1827
* setcursorposition ('\<window name\>', '\<text object name\>', \<position\>)
1829
* \section Description
1831
* Sets cursor position in a text field
1833
* \retval 1 on success, LdtpExecutionError exception on failure
1835
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
1839
* from ldtp import *
1841
* # Assuming that gedit is opened
1843
* settextvalue ('*-gedit', 'txt0', 'Testing setcursorposition function of LDTP')
1845
* setcursorposition ('*-gedit', 'txt0', 9)
1847
* The above example will set the given text value in first tab of gedit window and the cursor position will be moved to column number 10 of the first row.
1849
* \author Nagappan Alagappan <nagappan@gmail.com>
1852
/** \page istextstateenabled istextstateenabled
1855
* istextstateenabled ('\<window name\>', '\<text object name\>')
1857
* \section Description
1859
* Checks whether the text object is in editable state or not.
1861
* \retval 1 on success, 0 on failure.
1863
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
1869
* \author Nagappan Alagappan <nagappan@gmail.com>
1872
/** \page getstatusbartext getstatusbartext
1875
* getstatusbartext ('\<window name\>', '\<status bar name\>')
1877
* \section Description
1879
* Gets the text displayed in the status bar
1881
* \retval text content displayed in the status bar on success, LdtpExecutionError exception on failure.
1883
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/status-bar.c
1889
* \author Nagappan Alagappan <nagappan@gmail.com>
1892
/** \page verifystatusbar verifystatusbar
1895
* verifystatusbar ('\<window name\>', '\<status bar name\>')
1897
* \section Description
1899
* Checks whether the object is status bar or not
1901
* \retval 1 on success, 0 on failure
1903
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/status-bar.c
1907
* With respect to gedit status bar text
1909
* from ldtp import *
1911
* verifystatusbar ('*-gedit', 'stat0')
1913
* \author Nagappan Alagappan <nagappan@gmail.com>
1916
/** \page verifystatusbarvisible verifystatusbarvisible
1919
* verifystatusbarvisible ('\<window name\>', '\<status bar name\>')
1921
* \section Description
1923
* Checks whether the status bar object is visible or not
1925
* \retval 1 on success, 0 on failure
1927
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/status-bar.c
1931
* With respect to gedit status bar text
1933
* from ldtp import *
1935
* verifystatusbarvisible ('*-gedit', 'stat0')
1937
* \author Nagappan Alagappan <nagappan@gmail.com>
1940
/** \page selecttextbyindexandregion selecttextbyindexandregion
1943
* selecttextbyindexandregion ('\<window name\>', '\<text object name\>'[, <start position\>[, <end position\>[, <selection number\>]]])
1945
* \section Description
1947
* Select text by index (text selection change based on index) and the region (start and end position)
1949
* Reference: http://developer.gnome.org/doc/API/2.0/at-spi/at-spi-cspi-AccessibleText-Interface.html#AccessibleText-setSelection
1951
* \retval 1 on success, LdtpExecutionError exception on failure
1953
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
1959
* \author Nagappan Alagappan <nagappan@gmail.com>
1962
/** \page selecttextbyname selecttextbyname
1965
* selecttextbyname ('\<window name\>', '\<text object name\>')
1967
* \section Description
1969
* Select text by name
1971
* \retval 1 on success, LdtpExecutionError exception on failure
1973
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
1979
* \author Nagappan Alagappan <nagappan@gmail.com>
1982
/** \page getcursorposition getcursorposition
1985
* getcursorposition ('\<window name\>', '\<text object name\>')
1987
* \section Description
1989
* Gets the current cursor position of the given text object
1991
* \retval cursor position which is of type long on success, LdtpExecutionError exception on failure
1993
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
1997
* from ldtp import *
1999
* # Assuming that gedit is opened
2001
* settextvalue ('*-gedit', 'txt0', 'Testing setcursorposition function of LDTP')
2003
* getcursorposition ('*-gedit', 'txt0')
2005
* The above example will get the current cursor position in the text object of gedit windows first tab.
2007
* \author Nagappan Alagappan <nagappan@gmail.com>
2010
/** \page hidelist hidelist
2013
* hidelist ('\<dlgName\>', '\<cmbName\>')
2015
* \section Description
2017
* Hides combo box drop down list in the current dialog. Suppose in previous operation one testcase has clicked on combo box, its drop down list will be displayed. If further no any operation has been done on that combo box then to close that drop down list 'HideList' action is required
2019
* \section ImplementationDetails
2021
* Combo box will generally have a list as its child or a menu as its child. So this function gets object handle of list object, checks if list of combo box is visible, if yes then just click on combo box, click operation will close drop down list of combo box.
2023
* \retval 1 on success, LdtpExecutionError exception on failure
2025
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/combo-box.c
2031
* \author Poornima <pnayak@novell.com>
2034
/** \page comboselect comboselect
2037
* comboselect ('\<window name\>', '\<component name\>', '\<menu item name\>')
2039
* comboselect ('\<window name\>', '\<component name\>', '\<list item name\>')
2041
* \section Description
2043
* Select a menu item or list item in a combo box based on name
2045
* \retval 1 on success, LdtpExecutionError exception on failure
2047
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/combo-box.c
2051
* In gnome-search-tool combo box 'Available options' to select the menu item 'Contains the text'
2053
* comboselect ('SearchForFiles', 'cmbAvailableoptions', 'Contains the text')
2055
* \author Poornima <pnayak@novell.com>
2058
/** \page selectindex selectindex
2061
* selectindex ('\<dlgName\>', '\<object name\>', \<index\>)
2063
* \section Description
2065
* SelectIndex action will select an item from combo box where value of index is pointing to its position in list/menu.
2067
* \section ImplementationDetails
2069
* Combo box will generally have a list as its child or a menu as its
2070
* child. SelectIndex function will try to find whether child type is
2071
* menu or list, if child type is list then there will be a text box
2072
* associated with combo box. When child type is list, selects item at
2073
* index value from list box and sets that value to the text box
2074
* associated with combo box. If child type is menu, value specified
2075
* in tha argument will be index of menu item, corressponding menu
2076
* item will be selected.
2078
* In layered pane, this function call selects the object based on index.
2080
* \retval 1 on success, LdtpExecutionError exception on failure
2082
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/combo-box.c
2086
* # Selects the first folder / file in desktop
2088
* selectindex ('x-nautilus-desktop', 'Icon View', 0)
2090
* \author Poornima <pnayak@novell.com>
2091
* \author Nagappan Alagappan <nagappan@gmail.com>
2094
/** \page unselectindex unselectindex
2097
* unselectindex ('\<dlgName\>', '\<object name\>', \<index\>)
2099
* \section Description
2101
* In layered pane, this function call unselects the object based on index.
2103
* \retval 1 on success, LdtpExecutionError exception on failure
2105
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/layered-pane.c
2109
* # Unselects the first folder / file in desktop
2111
* unselectindex ('x-nautilus-desktop', 'Icon View', 0)
2113
* \author Nagappan Alagappan <nagappan@gmail.com>
2116
/** \page unselectitemindex unselectitemindex
2119
* unselectitemindex ('\<dlgName\>', '\<object name\>', \<index\>)
2121
* \section Description
2123
* In layered pane, this function call unselects the object based on
2124
* the currently selected item index.
2126
* \retval 1 on success, LdtpExecutionError exception on failure
2128
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/layered-pane.c
2132
* # Unselects the first folder / file in desktop that is already selected
2134
* unselectitemindex ('x-nautilus-desktop', 'Icon View', 0)
2136
* \author Nagappan Alagappan <nagappan@gmail.com>
2139
/** \page selectall selectall
2142
* selectall ('\<dlgName\>', '\<object name\>')
2144
* \section Description
2146
* In layered pane, this function call selects all the object.
2148
* \retval 1 on success, LdtpExecutionError exception on failure
2150
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/layered-pane.c
2154
* selectall ('x-nautilus-desktop', 'Icon View')
2156
* \author Nagappan Alagappan <nagappan@gmail.com>
2159
/** \page unselectall unselectall
2162
* unselectall ('\<dlgName\>', '\<object name\>')
2164
* \section Description
2166
* In layered pane, this function call unselects all the object.
2168
* \retval 1 on success, LdtpExecutionError exception on failure
2170
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/layered-pane.c
2174
* unselectall ('x-nautilus-desktop', 'Icon View')
2176
* \author Nagappan Alagappan <nagappan@gmail.com>
2179
/** \page selecteditemcount selecteditemcount
2182
* selecteditemcount ('\<dlgName\>', '\<object name\>')
2184
* \section Description
2186
* In layered pane, this function call returns the selected item count.
2188
* \retval Selected item count on success, LdtpExecutionError exception on failure
2190
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/layered-pane.c
2194
* selecteditemcount ('x-nautilus-desktop', 'Icon View')
2196
* \author Nagappan Alagappan <nagappan@gmail.com>
2199
/** \page ischildselected ischildselected
2202
* ischildselected ('\<dlgName\>', '\<object name\>', '\<item\>')
2204
* \section Description
2206
* In layered pane, this function call checks whether the given file /
2207
* folder is selected or not.
2209
* \retval Selected item count on success, LdtpExecutionError exception on failure
2211
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/layered-pane.c
2215
* ischildselected ('x-nautilus-desktop', 'Icon View', 'file-name.txt')
2217
* \author Nagappan Alagappan <nagappan@gmail.com>
2220
/** \page ischilditemselected ischilditemselected
2223
* ischilditemselected ('\<dlgName\>', '\<object name\>', '\<item\>')
2225
* \section Description
2227
* In layered pane, this function call checks whether the given file /
2228
* folder is selected in the previously selected list.
2230
* \retval Selected item count on success, LdtpExecutionError exception on failure
2232
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/layered-pane.c
2236
* ischilditemselected ('x-nautilus-desktop', 'Icon View', 'file-name.txt')
2238
* \author Nagappan Alagappan <nagappan@gmail.com>
2241
/** \page ischildindexselected ischildindexselected
2244
* ischildindexselected ('\<dlgName\>', '\<object name\>', \<index\>)
2246
* \section Description
2248
* In layered pane, this function call checks whether the given index
2249
* is selected or not.
2251
* \retval Selected item count on success, LdtpExecutionError exception on failure
2253
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/layered-pane.c
2257
* ischildindexselected ('x-nautilus-desktop', 'Icon View', 0)
2259
* \author Nagappan Alagappan <nagappan@gmail.com>
2262
/** \page ischilditemindexselected ischilditemindexselected
2265
* ischilditemindexselected ('\<dlgName\>', '\<object name\>', \<index\>)
2267
* \section Description
2269
* In layered pane, this function call checks whether the given index
2270
* is selected in the previously selected item.
2272
* \retval Selected item count on success, LdtpExecutionError exception on failure
2274
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/layered-pane.c
2278
* ischilditemindexselected ('x-nautilus-desktop', 'Icon View', 0)
2280
* \author Nagappan Alagappan <nagappan@gmail.com>
2283
/** \page settextvalue settextvalue
2286
* settextvalue ('\<window name\>', '\<component name\>', '\<text\>')
2288
* \section Description
2290
* puts the text into the component given by the component name
2292
* \section ImplementationDetails
2296
* \retval 1 on success and 0 otherwise
2300
* Combo box will be associated with child of type 'Text' when one of its child is 'List'. This action gets object handle of 'Text' object associated with combo box and then sets value given in argument in that text box
2302
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c http://cgit.freedesktop.org/ldtp/ldtp/tree/src/combo-box.c
2306
* With respect to gnome search tool text field
2308
* settextvalue ('SearchforFiles', 'txtNameContainsEntry', 'abcd')
2310
* This is to insert the text 'abcd' into the 'txtNameContainsEntry' field.
2314
* \todo settextvalue ('\<dlgName\>', '\<cmbName\>', '\<argument\>')
2316
* \author Poornima <pnayak@novell.com>
2319
/** \page appendtext appendtext
2322
* appendtext ('\<window name\>', '\<component name\>', '\<text\>')
2324
* \section Description
2326
* Appends the given text with already present text
2328
* \section ImplementationDetails
2330
* \retval 1 on success and 0 otherwise
2332
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
2336
* With respect to gedit structure
2338
* appendtext('gedit','txtmain','Sample text')
2340
* This to append 'Sample text' to the 'main' text box contents in gedit
2342
* \author Shagan <shagan.glare@gmail.com>
2345
/** \page activatetext activatetext
2348
* activatetext ('\<window name\>', '\<component name\>')
2350
* \section Description
2352
* activates the text box ( similar to press enter after setting text)
2354
* \section ImplementationDetails
2356
* \retval 1 on success and 0 otherwise
2358
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
2362
* With respect to gftp-gtk structure
2364
* activatetext ('gFTP', 'txtUser')
2366
* This is to activate the text box 'txtUser' in gftp-gtk
2368
* \author Shagan <shagan.glare@gmail.com>
2371
/** \page getcharcount getcharcount
2374
* getcharcount ('\<window name\>', '\<component name\>')
2376
* \section Description
2378
* Return the number of characters present in the component identified by the \<component name\>.
2380
* \section ImplementationDetails
2382
* \retval number of characters
2384
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
2388
* With respect to gedit
2390
* getcharcount ('gedit', 'txt0')
2392
* This will return the number of characters in the file presently open.
2394
* \author Premkumar J <prem.jothimani@gmail.com>
2397
/** \page cuttext cuttext
2400
* cuttext ('\<window name\>', '\<component name\>', \<startindex\>, \<endindex\>)
2402
* \section Description
2404
* Cut the text from startindex till the endindex in the component given by the component name
2406
* \section ImplementationDetails
2408
* \retval 1 on success and 0 otherwise
2410
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
2414
* With respect to gedit tool structure
2416
* cuttext ('gedit', 'txtName', 1, 3)
2418
* This is to cut the text from the startindex position till the endindex in the 'txtName' field.
2420
* \author Kamakshi <poorvakrishna@yahoo.com>
2423
/** \page copytext copytext
2426
* copytext ('\<window name\>', '\<component name\>', \<startoffset\>, \<endoffset\>)
2428
* \section Description
2430
* Copies text within specified offset present in the specified \<component\> into clipboard
2432
* \section ImplementationDetails
2434
* \retval 1 on success and 0 otherwise
2436
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
2440
* With respect to gedit tool structure
2442
* copytext ('gedit', 'txt0', 5,10)
2444
* This is to copy the text within the offset specified from the 'txt0' field into clipboard.
2446
* \author Premkumar J <prem.jothimani@gmail.com>
2449
/** \page inserttext inserttext
2452
* inserttext ('\<window name\>', '\<component name\>', \<position\>, '\<text\>')
2454
* \section Description
2456
* Insert the text in the specified position in the component given by the component name
2458
* \section ImplementationDetails
2460
* \retval 1 on success and 0 otherwise
2462
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
2466
* With respect to gedit
2468
* inserttext ('*-gedit', 'txt0', 5, 'sample text')
2470
* This is to insert the given text at the specified position in the 'txtName' field.
2472
* \author Premkumar J <prem.jothimani@gmail.com>
2475
/** \page pastetext pastetext
2478
* pastetext ('\<window name\>', '\<component name\>', \<position\>)
2480
* \section Description
2482
* paste the text from the position specified in the component given by the component name
2484
* \section ImplementationDetails
2486
* \retval 1 on success and 0 otherwise
2488
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
2492
* With respect to gedit tool structure
2494
* pastetext ('gedit', 'txtName', 1)
2496
* This is to paste the text from the position specified in the 'txtName' field.
2498
* \author Kamakshi <poorvakrishna@yahoo.com>
2501
/** \page deletetext deletetext
2504
* deletetext ('\<window name\>', '\<component name\>', \<startindex\>, \<endindex\>)
2506
* \section Description
2508
* delete the text from the startindex till the endindex in the component given by the component name
2510
* \section ImplementationDetails
2512
* \retval 1 on success and 0 otherwise
2514
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
2518
* With respect to gedit tool structure
2520
* deletetext ('gedit', 'txtName', 1, 3)
2522
* This is to delete the text from the startindex to endindex specified in the 'txtName'field.
2524
* \author Kamakshi <poorvakrishna@yahoo.com>
2527
/** \page showlist showlist
2530
* showlist ('\<dlgName\>', '\<cmbName\>')
2532
* \section Description
2534
* Displays combo box drop down list in the current dialog.
2536
* \section ImplementationDetails
2538
* Combo box will generally have a list as its child or a menu as its child. So this function gets object handle of list object, checks if list of combo box is visible, if not then just click on combo box, click operation will display drop down list of combo box.
2540
* \retval 1 on success, LdtpExecutionError on failure
2542
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/combo-box.c
2548
* \author Poornima <pnayak@novell.com>
2551
/** \page verifydropdown verifydropdown
2554
* verifydropdown ('\<window name\>', '\<combo box / list name\>')
2556
* \section Description
2558
* \retval 1 on success, 0 on failure
2560
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/combo-box.c
2566
* \author Poornima <pnayak@novell.com>
2569
/** \page verifyhidelist verifyhidelist
2572
* verfyhidelist ('\<dlgName\>', '\<cmbName\>')
2574
* \section Description
2576
* Verifies if combo box drop down list in the current dialog is not visible.
2578
* \section ImplementationDetails
2580
* Combo box will generally have a list as its child or a menu as its child. So this function gets object handle of list or menu object, checks if list or menu items of combo box is visible, if yes then return minus one else returns zero.
2582
* \retval 1 on success, 0 on failure
2584
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/combo-box.c
2590
* \author Poornima <pnayak@novell.com>
2593
/** \page verifyshowlist verifyshowlist
2596
* verifyshowlist ('\<dlgName\>', '\<cmbName\>')
2598
* \section Description
2600
* Verifies if combo box drop down list in the current dialog is visible.
2602
* \section ImplementationDetails
2604
* Combo box will generally have a list as its child or a menu as its child. So this function gets object handle of list or menu object, checks if list or menu items of combo box is visible, if yes then return zero else minus one.
2606
* \retval 1 on success, 0 on failure
2608
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/combo-box.c
2614
* \author Poornima <pnayak@novell.com>
2617
/** \page verifyselect verifyselect
2620
* verifyselect ('\<dlgName\>', '\<cmbName\>', '\<argument\>')
2622
* \section Description
2624
* VerfySelect action will verify if combo box is set to value given in argument.
2626
* \section ImplementationDetails
2628
* VerifySelect function will try to find if text box associated with combo box is set to value specified in the argument.
2630
* \retval 1 on success, 0 on failure
2632
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/combo-box.c
2636
* In gnome-search-tool combo box 'Available options' to select the menu item 'Contains the text'
2638
* verifyselect ('SearchForFiles', 'cmbAvailableoptions', 'Contains the text')
2640
* \author Poornima <pnayak@novell.com>
2643
/** \page verifysettext verifysettext
2646
* verifysettext ('\<window name\>', '\<component name\>', '\<text\>')
2648
* \section Description
2650
* checks if the text is inserted into the component given by the component name
2652
* \section ImplementationDetails
2654
* \retval 1 if the text is inserted into the specified component else returns 0
2656
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/combo-box.c
2660
* With respect to gnome search tool structure
2662
* verifysettext ('SearchforFiles', 'txtNameContainsEntry', 'abcd')
2664
* This is to verify if the previous settextvalue function has inserted 'abcd' into the txtNameContainsEntry field in the gnome search tool
2666
* \author Poornima <pnayak@novell.com>
2669
/** \page rightclick rightclick
2672
* rightclick ('\<window name\>', '\<component name\>', '\<menu item\>', '[data]')
2674
* \todo icon - rightclick ('\<window name\>', '\<component name\>')
2676
* \section Description
2678
* Right click on the given object.
2680
* \section ImplementationDetails
2682
* This function gets the coordinate of the given object and the right click event is generated.
2684
* \note If the object's window is not in focus, then this function will fail
2686
* \retval 1 on success, LdtpExecutionError exception on failure
2688
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
2689
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/layered-pane.c
2693
* # Right click on an embedded component object type
2695
* rightclick ('frmBottomExpandedEdgePanel', 'Volume Control', None)
2697
* \author Thanikachalam S <thanika1999@yahoo.com>
2698
* \author Poornima <pnayak@novell.com>
2699
* \author Premkumar J <prem.jothimani@gmail.com>
2702
/** \page getlabel getlabel
2705
* getlabel ('\<window name\>', '\<label name\>')
2707
* \section Description
2709
* \retval label string on success, LdtpExecutionError exception on failure
2711
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/label.c
2717
* \author Thanikachalam S <thanika1999@yahoo.com>
2720
/** \page getlabelatindex getlabelatindex
2723
* getlabelatindex ('\<window name\>', '\<panel name\>', index)
2725
* \section Description
2727
* Gets label name based on index from the panel.
2729
* \retval label name on success, LdtpExecutionError exception on failure
2731
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/label.c
2737
* \author Nagappan Alagappan <nagappan@gmail.com>
2740
/** \page selectitem selectitem
2743
* selectitem ('\<window name\>', '\<object name\>', '\<item\>')
2745
* \section Description
2747
* \retval 1 on success, LdtpExecutionError exception on failure
2750
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/layered-pane.c
2751
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/combo-box.c
2755
* selectitem ('x-nautilus-desktop', 'Icon View', 'file-name.txt')
2757
* \author Thanikachalam S <thanika1999@yahoo.com>
2760
/** \page unselectitem unselectitem
2763
* unselectitem ('\<window name\>', '\<object name\>', '\<item\>')
2765
* \section Description
2767
* Unselect the item that is already selected based on given name
2769
* \retval 1 on success, LdtpExecutionError exception on failure
2771
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/layered-pane.c
2775
* unselectitem ('x-nautilus-desktop', 'Icon View', 'file-name.txt')
2777
* \author Nagappan Alagappan <nagappan@gmail.com>
2780
/** \page selecttextitem selecttextitem
2783
* selecttextitem ('\<window name\>', '\<combo box name\>', '\<item\>')
2785
* \section Description
2787
* Selects a text item in a combox box and the combo box may contain either list or menu item.
2789
* \retval 1 on success, LdtpExecutionError exception on failure
2791
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/combo-box.c
2792
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/list.c
2796
* With respect to gedit, find dialog
2798
* from ldtp import *
2800
* click ('*-gedit', 'btnFind')
2802
* # assuming that LDTP string is available in the list of searched strings
2804
* selecttextitem ('dlgFind', 'cboSearchFor', 'LDTP')
2806
* \author Poornima Nayak <pnayak@novell.com>
2809
/** \page selectmenuitem selectmenuitem
2812
* selectmenuitem ('\<window name\>', '\<menu hierarchy\>')
2814
* \section Description
2816
* Selects the menu item specified.
2818
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/menu.c
2819
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/check-menu-item.c
2821
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/menu-item.c
2822
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/radio-menu-item.c
2826
* With respect to gedit menu structure
2828
* selectmenuitem ('*-gedit', 'mnuFile;mnuNew')
2830
* \author Nagappan Alagappan <nagappan@gmail.com>
2831
* \author Thanikachalam S <thanika1999@yahoo.com>
2834
/** \page selecttab selecttab
2837
* selecttab ('\<window name\>', '\<tab list name\>', '\<tab name\>')
2839
* \section Description
2841
* Select the given tab name in the tab list
2843
* \section ImplementationDetails
2845
* \retval 1 if the tab is selected, \exception otherwise LdtpExecutionError will be thrown
2847
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/page-tab-list.c
2851
* from ldtp import *
2853
* For selecting Editor tab with respect to gedit preferences
2855
* selecttab ('dlgPreferences', 'ptlPreferences', 'Editor')
2857
* \author Thanikachalam S <thanika1999@yahoo.com>
2860
/** \page selecttabindex selecttabindex
2863
* selecttabindex ('\<window name\>', '\<tab list name\>', \<index of the tab\>)
2865
* \section Description
2867
* Select a particular tab in the list of tabs
2869
* \section ImplementationDetails
2871
* \retval 1 if the tab is selected, \exception otherwise LdtpExecutionError will be thrown
2873
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/page-tab-list.c
2877
* from ldtp import *
2879
* For selecting Editor tab with respect to gedit preferences
2881
* selecttabindex ('dlgPreferences', 'ptlPreferences', 1)
2883
* \note 0 based index
2885
* \author Nagappan Alagappan <nagappan@gmail.com>
2888
/** \page gettabcount gettabcount
2891
* gettabcount ('\<window name\>', '\<tab list name\>')
2893
* \section Description
2895
* Returns the page tab count of a page tab list
2897
* \retval tab count of type long is returned on success, LdtpExecutionError on failure
2899
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/page-tab-list.c
2903
* With respect to Preferences dialog of gedit
2905
* from ldtp import *
2907
* selectmenuitem ('*-gedit', 'mnuEdit;mnuPreferences')
2909
* gettabcount ('dlgPreferences', 'ptl0')
2911
* \author Nagappan Alagappan <nagappan@gmail.com>
2914
/** \page gettabname gettabname
2917
* gettabname ('\<window name\>', '\<tab list name\>', \<index\>)
2919
* \section Description
2921
* Returns the page tab name of the given index in a page tab list
2923
* \retval tab name is returned on success, LdtpExecutionError on failure
2925
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/page-tab-list.c
2929
* With respect to Preferences dialog of gedit
2931
* from ldtp import *
2933
* selectmenuitem ('*-gedit', 'mnuEdit;mnuPreferences')
2935
* gettabname ('dlgPreferences', 'ptl0', 0)
2937
* \author Nagappan Alagappan <nagappan@gmail.com>
2940
/** \page verifypushbutton verifypushbutton
2943
* verifypushbutton ('\<window name\>', '\<component name\>')
2945
* \section Description
2947
* Verify whether the given object is push button or not.
2949
* \section ImplementationDetails
2951
* \retval 1 if object is push button, else 0.
2953
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/push-button.c
2957
* With respect to gedit open dialog window, verify open button is push button or not.
2959
* verifypushbutton ('dlgOpenFile', 'btnOpen')
2961
* \author Nagappan Alagappan <nagappan@gmail.com>
2964
/** \page stateenabled stateenabled
2967
* stateenabled ('\<window name\>', '\<component name\>')
2969
* \section Description
2971
* Checks the radio button object state enabled or not
2973
* \section ImplementationDetails
2975
* \retval 1 if state is enabled, else 0.
2977
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/push-button.c
2978
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/radio-button.c
2982
* Push button: With respect to gedit Open dialog, this function checks open button state enabled or not
2984
* stateenabled ('dlgOpenFile', 'btnOpen')
2986
* Radio button: With respect to gedit Print dialog, this function cheks the 'All' radio button state is enabled or not
2988
* stateenabled ('Print', 'All')
2990
* Check box: With respect to gedit Print dialog, this function cheks the 'Reverse' check box state is enabled or not
2992
* stateenabled ('Print', 'Reverse')
2994
* \author Nagappan Alagappan <nagappan@gmail.com>
2997
/** \page setvalue setvalue
3000
* setvalue ('\<window name\>', '\<spinbutton name\>', \<value\>)
3002
* \section Description
3004
* Sets the value of the spin button.
3006
* \section ImplementationDetails
3008
* \retval 1 on success, else LdtpExecutionError exception
3010
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/spin-button.c
3014
* Creation of Appointment in Evolution:
3016
* setvalue ('dlgAppointment-Nosummary','sbtnOccurence',2)
3018
* \author Thanikachalam S <thanika1999@yahoo.com>
3021
/** \page getvalue getvalue
3024
* getvalue ('\<window name\>', '\<spinbutton name\>')
3026
* \section Description
3028
* Gets the value in the spin button.
3030
* \section ImplementationDetails
3032
* \retval value in the spin button on success, else LdtpExecutionError exception
3034
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/spin-button.c
3038
* Creation of Appointment in Evolution:
3040
* getvalue ('dlgAppointment-Nosummary', 'sbtnOccurence')
3042
* \author Thanikachalam S <thanika1999@yahoo.com>
3045
/** \page getmaxvalue getmaxvalue
3048
* getmaxvalue ('\<window name\>', '\<spinbutton name\>')
3050
* \section Description
3052
* Gets the max value of the spin button.
3054
* \section ImplementationDetails
3056
* \retval max value of the spin button on success, else LdtpExecutionError exception
3058
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/spin-button.c
3062
* Creation of Appointment in Evolution:
3064
* getmaxvalue ('dlgAppointment-Nosummary', 'sbtnOccurence')
3066
* \author Nagappan Alagappan <nagappan@gmail.com>
3069
/** \page getminvalue getminvalue
3072
* getminvalue ('\<window name\>', '\<spinbutton name\>')
3074
* \section Description
3076
* Gets the min value of the spin button.
3078
* \section ImplementationDetails
3080
* \retval min value of the spin button on success, else LdtpExecutionError exception
3082
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/spin-button.c
3086
* Creation of Appointment in Evolution:
3088
* getminvalue ('dlgAppointment-Nosummary', 'sbtnOccurence')
3090
* \author Nagappan Alagappan <nagappan@gmail.com>
3093
/** \page getminincrement getminincrement
3096
* getminincrement ('\<window name\>', '\<spinbutton name\>')
3098
* \section Description
3100
* Gets the min value of the spin button.
3102
* \section ImplementationDetails
3104
* \retval min value of the spin button on success, else LdtpExecutionError exception
3106
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/spin-button.c
3107
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/slider.c
3111
* Creation of Appointment in Evolution:
3113
* getminincrement ('dlgAppointment-Nosummary', 'sbtnOccurence')
3115
* \author Nagappan Alagappan <nagappan@gmail.com>
3118
/** \page verifysetvalue verifysetvalue
3121
* verifysetvalue ('\<window name\>', '\<spinbutton name\>', '\<value\>')
3123
* \section Description
3125
* Verifies the value set in spin button.
3127
* \section ImplementationDetails
3129
* \retval 1 on success and 0 on error.
3131
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/spin-button.c
3135
* In the Creation of Appointment:
3137
* verifysetvalue ('dlgAppointment-Nosummary','sbtnOccurence','2')
3139
* \author Sheetal <svnayak18@yahoo.com>
3142
/** \page selectrow selectrow
3145
* selectrow ('\<window name\>', '\<table name\>', '\<value of row in first column\>')
3147
* \section Description
3149
* Selects the row in table whose first column's (0th column) value is same as the contents of the third argument in the function call.
3151
* \section ImplementationDetails
3153
* \retval 1 on success and 0 on error.
3155
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
3156
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
3160
* from ldtp import *
3162
* With respect to gedit open dialog
3164
* selectrow ('dlgOpen', 'dlgFiles', 'readme')
3166
* \author Nagappan Alagappan <nagappan@gmail.com>
3169
/** \page selectrowindex selectrowindex
3172
* selectrowindex ('\<window name\>', '\<table name\>', \<row index\>)
3174
* \section Description
3176
* Selects the row with the given index value in table. Index value starts from 0.
3178
* \section ImplementationDetails
3180
* \retval 1 on success and 0 on error.
3182
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
3183
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
3187
* from ldtp import *
3189
* With respect to gedit open dialog
3191
* selectrowindex ('dlgOpen', 'dlgFiles', 0)
3193
* \author Nagappan Alagappan <nagappan@gmail.com>
3196
/** \page selectrowpartialmatch selectrowpartialmatch
3199
* selectrowpartialmatch ('\<window name\>', '\<tree table name\>', '\<texttobesearchedfor\>')
3201
* \section Description
3203
* selects the row having cell that contains the given text.
3205
* \section ImplementationDetails
3207
* \retval 1 on success and throws an exception on error
3209
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
3210
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
3214
* With respect to evolution
3216
* selectrowpartialmatch ('evolution', 'ttblMailFolder','Inbox')
3218
* The 'Inbox' folder's name changes depending on the number of unread mails. In such cases we can use the above method to select the 'Inbox' folder.
3220
* \author Nagashree <mnagashree@novell.com>
3223
/** \page verifytoggled verifytoggled
3226
* verifytoggled ('<window name\>', 'component name\>')
3228
* \section Description
3230
* Verify whether the toggle button is toggled or not
3232
* \retval 1 on success, else 0
3234
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/toggle-button.c
3238
* 1. With respect to GTK File Selector - Open dialog in gedit application
3240
* from ldtp import *
3242
* verifytoggled ('Open File*', 'Type a file name') # If 'Type a file name' button is toggled then location text box will be in editable state in GTK file selector
3244
* 2. With respect to GTK File Selector in gedit
3246
* from ldtp import *
3248
* click ('*-gedit', 'btnOpen')
3250
* verifytoggled ('dlgOpenFile...', 'tbtnTypeafilename')
3252
* \author Poornima Nayak <pnayak@novell.com>
3253
* \author Premkumar J <prem.jothimani@gmail.com>
3256
/** \page onedown onedown
3259
* onedown ('\<window name\>', '\<scroll component name\>', \<number of iterations\>)
3261
* \section Description
3263
* Move the scroll bar down 'n' times, where 'n' is the number of iterations specified in the argument field.
3265
* \section ImplementationDetails
3267
* Scrolls down if value does not exceed the maximum limit, else fails.
3269
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/scroll-bar.c
3273
* from ldtp import *
3275
* For scroll bar item with respect to gedit
3277
* onedown ('gedit', 'scrollBar', 3)
3279
* \author Aishwariya & Kamakshi <poorvaishoo@yahoo.com>
3282
/** \page oneleft oneleft
3285
* oneleft ('\<window name\>', '\<scroll component name\>', \<number of iterations\>)
3287
* \section Description
3289
* Move the (horizontal) scroll bar left 'n' times, where 'n' is the number of iterations specified in the argument field.
3291
* \section ImplementationDetails
3293
* Scrolls left if value does not drop below the minimum limit, else fails.
3295
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/scroll-bar.c
3299
* from ldtp import *
3301
* For scroll bar item with respect to gedit
3303
* oneleft ('gedit', 'scrollBar', 3)
3305
* \author Aishwariya & Kamakshi <poorvaishoo@yahoo.com>
3308
/** \page oneright oneright
3311
* oneright ('\<window name\>', '\<scroll component name\>', \<number of iterations\>)
3313
* \section Description
3315
* Move the (horizontal) scroll bar right 'n' times, where 'n' is the number of iterations specified in the argument field.
3317
* \section ImplementationDetails
3319
* Scrolls right if value does not exceed the maximum limit, else fails.
3321
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/scroll-bar.c
3325
* from ldtp import *
3327
* For scroll bar item with respect to gedit
3329
* oneright ('gedit', 'scrollBar', 3)
3331
* \author Aishwariya & Kamakshi <poorvaishoo@yahoo.com>
3334
/** \page oneup oneup
3337
* oneup ('\<window name\>', '\<scroll component name\>', \<number of iterations\>)
3339
* \section Description
3341
* Move the (vertical) scroll bar up 'n' times, where 'n' is the number of iterations specified in the argument field.
3343
* \section ImplementationDetails
3345
* Scrolls up if value does not drop below the minimum limit, else fails.
3347
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/scroll-bar.c
3351
* from ldtp import *
3353
* For scroll bar item with respect to gedit
3355
* oneup ('gedit', 'scrollBar', 3)
3357
* \author Aishwariya & Kamakshi <poorvaishoo@yahoo.com>
3360
/** \page scrolldown scrolldown
3363
* scrolldown ('\<window name\>', '\<scroll component name\>')
3365
* \section Description
3367
* Move the (vertical) scroll bar to the bottom.
3369
* \section ImplementationDetails
3371
* \retval 1 if action is performed, else 0.
3373
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/scroll-bar.c
3377
* from ldtp import *
3379
* For scroll bar item with respect to gedit
3381
* scrolldown ('gedit', 'scrollBar')
3383
* \author Aishwariya & Kamakshi <poorvaishoo@yahoo.com>
3386
/** \page scrollleft scrollleft
3389
* scrolleft ('\<window name\>', '\<scroll component name\>')
3391
* \section Description
3393
* Move the (horizontal) scroll bar to the extreme left.
3395
* \section ImplementationDetails
3397
* \retval 1 if action is performed, else 0.
3399
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/scroll-bar.c
3403
* from ldtp import *
3405
* For scroll bar item with respect to gedit
3407
* scrolleft ('gedit', 'scrollBar')
3409
* \author Aishwariya & Kamakshi <poorvaishoo@yahoo.com>
3412
/** \page scrollright scrollright
3415
* scrollright ('\<window name\>', '\<scroll component name\>')
3417
* \section Description
3419
* Move the (horizontal) scroll bar to the extreme right.
3421
* \section ImplementationDetails
3423
* \retval 1 if action is performed, else 0.
3425
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/scroll-bar.c
3429
* from ldtp import *
3431
* For scroll bar item with respect to gedit
3433
* scrollright ('gedit', 'scrollBar')
3435
* \author Aishwariya & Kamakshi <poorvaishoo@yahoo.com>
3438
/** \page scrollup scrollup
3441
* scrollup ('\<window name\>', '\<scroll component name\>')
3443
* \section Description
3445
* Move the (vertical) scroll bar to the extreme top.
3447
* \section ImplementationDetails
3449
* \retval 1 if action is performed, else 0.
3451
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/scroll-bar.c
3455
* from ldtp import *
3457
* For scroll bar item with respect to gedit
3459
* scrollup ('gedit', 'scrollBar')
3461
* \author Aishwariya & Kamakshi <poorvaishoo@yahoo.com>
3464
/** \page setmax setmax
3467
* setmax ('\<window name\>', '\<slider name\>')
3469
* \section Description
3471
* Set the slider to the maximum value.
3473
* \section ImplementationDetails
3475
* \retval 1 if action is performed, else 0.
3477
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/slider.c
3481
* from ldtp import *
3483
* For slider component with respect to gnome-terminal
3485
* setmax ('dlgEditingProfile"Default"', 'slider')
3487
* \author Aishwariya & Kamakshi <poorvaishoo@yahoo.com>
3490
/** \page setmin setmin
3493
* setmin ('\<window name\>', '\<slider name\>')
3495
* \section Description
3497
* Set the slider to the minimum value.
3499
* \section ImplementationDetails
3501
* \retval 1 if action is performed, else 0.
3503
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/slider.c
3507
* from ldtp import *
3509
* For slider component with respect to gnome-terminal
3511
* setmin ('dlgEditingProfile"Default"', 'slider')
3513
* \author Aishwariya & Kamakshi <poorvaishoo@yahoo.com>
3516
/** \page getslidervalue getslidervalue
3519
* getslidervalue ('\<window name\>', '\<slider name\>')
3521
* \section Description
3523
* Returns the slider value of the given object. Volume controller of type slider
3525
* \retval slider value of type float is returned on success, LdtpExecutionError on failure
3527
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/slider.c
3533
* \author Aishwariya & Kamakshi <poorvaishoo@yahoo.com>
3536
/** \page increase increase
3539
* increase ('\<window name\>', '\<slider name\>', \<number of iterations\>)
3541
* \section Description
3543
* Increase the value of the slider 'n' times, where 'n' is the number of iterations specified in the argument field.
3545
* \section ImplementationDetails
3547
* Increases the value if it does not exceed the maximum limit, else fails.
3549
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/slider.c
3553
* from ldtp import *
3555
* For slider component with respect to gnome-terminal
3557
* increase ('dlgEditingProfile"Default"', 'slider', 3)
3559
* \author Aishwariya & Kamakshi <poorvaishoo@yahoo.com>
3562
/** \page decrease decrease
3565
* decrease ('\<window name\>', '\<slider name\>', \<number of iterations\>)
3567
* \section Description
3569
* Decrease the value of the slider 'n' times, where 'n' is the number of iterations specified in the argument field.
3571
* \section ImplementationDetails
3573
* Decreases the value if it does not fall below the minimum limit, else fails.
3575
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/slider.c
3579
* from ldtp import *
3581
* For slider component with respect to gnome-terminal
3583
* decrease ('dlgEditingProfile"Default"', 'slider', 3)
3585
* \author Aishwariya & Kamakshi <poorvaishoo@yahoo.com>
3588
/** \page selectpanel selectpanel
3591
* selectpanel ('\<window name\>', '\<component name\>', \<panel number\>)
3593
* \section Description
3595
* Select a panel using the panel number in a list of panels
3597
* \section ImplementationDetails
3599
* \retval 1 on success and 0 on error
3601
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/panel.c
3605
* from ldtp import *
3607
* With respect to Evolution Contacts
3609
* selectpanel ('frmEvolution-Contacts', 'pnlAddbook', 1)
3611
* \author Poornima Nayak <pnayak@novell.com>
3614
/** \page selectlabelspanelbyname selectlabelspanelbyname
3617
* selectlabelspanelbyname ('<window name\>', '<label name\>')
3619
* \section Description
3621
* \retval 1 on success, LdtpExecutionError on failure
3623
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/label.c
3629
* \author Nagappan Alagappan <nagappan@gmail.com>
3632
/** \page verifytablecell verifytablecell
3635
* verifytablecell ('\<window name\>', '\<table name\>', \<row no\>, \<column no\>, '\<string to be compared\>')
3637
* \section Description
3639
* Verifies the tablecell value with the String Passed ie., fifth argument
3641
* \section ImplementationDetails
3643
* \retval 1 on success and 0 on error.
3645
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
3649
* from ldtp import *
3651
* With respect to Evolution, open message
3653
* verifytablecell ('frmReadOnlyMail', 'tblcheck', 1, 1, 'xyz\@yahoo.com')
3655
* \author Bhargavi <kbhargavi_83@yahoo.co.in>
3658
/** \page setcellvalue setcellvalue
3661
* setcellvalue ('<window name\>', '<table name\>', <row\>, <column\>, '<item\>')
3663
* \section Description
3665
* \retval 1 on success, LdtpExecutionError exception on failure
3667
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
3673
* \author Nagappan Alagappan <nagappan@gmail.com>
3676
/** \page selectlastrow selectlastrow
3679
* selectlastrow ('\<window name\>', '\<table name\>')
3681
* \section Description
3683
* Selects the last row of a table.
3685
* \retval 1 on success, 0 otherwise.
3687
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
3691
* from ldtp import *
3693
* With respect to Contact List Members dialog of Contact List Editor
3695
* selectlastrow ('dlgContactListMembers', 'tblContacts')
3697
* \author Nagappan Alagappan <nagappan@gmail.com>
3700
/** \page setcontext setcontext
3703
* setcontext ('\<previous title name\>', '\<new title name\>')
3705
* \section Description
3707
* LDTP selects window (frame / dialog / alert / font chooser) based on the title name.
3709
* \section ImplementationDetails
3711
* set the context to new title name. Changes are done in is_matching function in gui.c
3713
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
3717
* In some applications the window title changes based on the operation we are doing. For example, when we browse any URL in Firefox browser, the title bar changes. Once title bar changed, then we can change the context using this function.
3719
* setcontext ('Mozilla Firefox', 'NOVELL: Novell and Linux - Mozilla Firefox')
3721
* \author Nagappan Alagappan <nagappan@gmail.com>
3724
/** \page releasecontext releasecontext
3729
* \section Description
3731
* Release the last context set.
3733
* \section ImplementationDetails
3735
* Release the existing (last) context set using \ref setcontext function.
3737
* \retval 1 on success, LdtpExecutionError on failure
3739
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
3743
* In some applications the window title changes based on the operation we are doing. For example, when we browse any URL in Firefox browser, the title bar changes. Once title bar changed, then we can change the context using this function.
3747
* \author Nagappan Alagappan <nagappan@gmail.com>
3750
/** \page selectevent selectevent
3753
* selectevent ('\<window name\>', '\<Calendar_view name\>', '\<calendar event summary\>')
3755
* \section Description
3757
* Selects the row from the table of calendar events based on the calendar event name specified
3759
* \section ImplementationDetails
3761
* \retval 1 on success, else 0.
3763
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/calendar-view.c
3767
* In Evolution Calendars,for selecting an appointment-(calendar event) present in the table
3769
* from ldtp import *
3771
* selectevent ('Evolution-Calendars', 'calview', 'abc')
3773
* \author Poornima <pnayak@novell.com>
3776
/** \page selecteventindex selecteventindex
3779
* selecteventindex ('\<window name\>', '\<component name\>', \<event number\>)
3781
* \section Description
3783
* Select an event from a calendar table using its index. Index for a calendar event starts from 1.
3785
* \section ImplementationDetails
3787
* \retval 1 on success, else 0
3789
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/calendar-view.c
3793
* from ldtp import *
3795
* With respect to Evolution-Calendars
3797
* selecteventindex ('Evolution-Calendars', 'calview', 1)
3799
* \author Poornima <pnayak@novell.com>
3802
/** \page doesrowexist doesrowexist
3805
* doesrowexist ('\<window name\>', '\<table name\>', '\<string to be
3806
* matched\>'[, \<partial match = False\>])
3808
* \section Description
3810
* Checks whether the table contains any row with any of its cell
3811
* containing the given string as its value.Please note that it checks
3812
* for an exact match, if partial match is set to False.
3814
* \section ImplementationDetails
3816
* \retval 1 if there are rows with the given string in any of its cell, else 0.
3818
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
3822
* from ldtp import *
3824
* With respect to the message list table in Evolution Mailer, the following call will return 1 if there is atleast one mail in the list with the given string in the subject field or sender field or in any other field for that matter.
3826
* doesrowexist ('dlgContactListMembers', 'tblContacts', 'Sample subject')
3828
* doesrowexist ('dlgContactListMembers', 'tblContacts', 'Sample', True)
3830
* \author Manu <manunature@rediffmail.com>
3833
/** \page checkrow checkrow
3836
* checkrow ('\<window name\>', '\<table name\>', \<row index\>[, \<col index\>])
3838
* \section Description
3840
* checks the row with the given index value in table. This can take an optional column index and perform the action on that particular column. If the column index is not given, 0 is taken as the default value.Index value starts from 0.
3842
* \section ImplementationDetails
3844
* \retval 1 on success, else 0.
3846
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
3850
* from ldtp import *
3852
* With respect to Categories in Appointment in Evolution
3854
* checkrow('dlgCategories','tblcategories',3)
3856
* \author Bhargavi <kbhargavi_83@yahoo.co.in>
3859
/** \page verifycheckrow verifycheckrow
3862
* verifycheckrow ('\<window name\>', '\<table name\>', \<row index\>[, \<col index\>])
3864
* \section Description
3868
* \section ImplementationDetails
3870
* \retval 1 on success, else 0.
3872
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
3876
* from ldtp import *
3878
* With respect to Categories in Appointment in Evolution
3880
* verifycheckrow ('dlgCategories', 'tblcategories', 3)
3882
* \author Bhargavi <kbhargavi_83@yahoo.co.in>
3885
/** \page uncheckrow uncheckrow
3888
* uncheckrow ('\<window name\>', '\<table name\>', \<row index\>[, \<col index\>])
3890
* \section Description
3892
* unchecks the row with the given index value in table. This can take an optional column index and perform the action on that particular column. If the column index is not given, 0 is taken as the default value.Index value starts from 0.
3894
* \section ImplementationDetails
3896
* \retval 1 on success, else 0.
3898
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
3902
* from ldtp import *
3904
* With respect to Categories in Appointment in Evolution
3906
* uncheckrow('dlgCategories','tblcategories',3)
3908
* \author Bhargavi <kbhargavi_83@yahoo.co.in>
3911
/** \page verifyuncheckrow verifyuncheckrow
3914
* verifyuncheckrow ('\<window name\>', '\<table name\>', \<row index\>[, \<col index\>])
3916
* \section Description
3920
* \section ImplementationDetails
3922
* \retval 1 on success, else 0.
3924
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
3928
* from ldtp import *
3930
* With respect to Categories in Appointment in Evolution
3932
* verifyuncheckrow ('dlgCategories', 'tblcategories', 3)
3934
* \author Bhargavi <kbhargavi_83@yahoo.co.in>
3937
/** \page sortcolumn sortcolumn
3940
* sortcolumn ('<window name\>', '<table name\>', '<column name\>')
3942
* \section Description
3944
* Sort table based on column name.
3946
* \retval 1 on success, LdtpExecutionError exception on failure
3948
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
3949
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
3958
/** \page sortcolumnindex sortcolumnindex
3961
* sortcolumnindex ('<window name\>', '<table name\>', <column index\>)
3963
* \section Description
3965
* Sort table based on column index.
3967
* \retval 1 on success, LdtpExecutionError exception on failure
3969
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
3970
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
3979
/** \page verifypartialmatch verifypartialmatch
3982
* verifypartialmatch ('\<window name\>', '\<textbox name\>' , '\<substring\>' )
3984
* \section Description
3986
* Verifies the textbox with the partial string
3988
* \section ImplementationDetails
3990
* \retval 1 on success, else 0.
3992
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
3996
* from ldtp import *
3998
* With respect to Evolution, to verify textbox with partial string
4000
* verifypartialmatch ('frmComposeamessage', 'txtto','nove')
4002
* \author Bhargavi <kbhargavi_83yahoo.co.in>
4005
/** \page getrowcount getrowcount
4008
* getrowcount ('\<window name\>', '\<table name\>')
4010
* \section Description
4012
* Returns the number of rows present in the table mentioned
4014
* \retval number of rows present in the table on success, else -1
4016
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
4018
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
4022
* from ldtp import *
4024
* With respect to Evolution, to check no of mails
4026
* getrowcount ('frmReadOnlyMail', 'tblmails')
4028
* \author Bhargavi <kbhargavi_83@yahoo.co.in>
4031
/** \page verifypartialtablecell verifypartialtablecell
4034
* verifypartialtablecell ('\<window name\>', '\<table name\>', \<row no\>, \<column no\>, '\<sub string to be compared\>')
4036
* \section Description
4038
* Verifies the tablecell value with the sub String Passed ie., fifth argument
4040
* \section ImplementationDetails
4042
* \retval 1 on success, else 0.
4044
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
4048
* from ldtp import *
4050
* With respect to Evolution, open message
4052
* verifypartialtablecell ('frmReadOnlyMail', 'tblcheck', 1, 1, 'xyz')
4054
* \author Bhargavi <kbhargavi_83@yahoo.co.in>
4057
/** \page grabfocus grabfocus
4060
* grabfocus ('\<window name\>'[, '\<component name\>'])
4062
* \section Description
4064
* gives focus to the specified context or component, in case of a text box the cursor is placed in it.
4066
* \section ImplementationDetails
4068
* \retval 1 on success, else LdtpExecutionError exception
4072
* With respect to gnome search tool structure
4074
* settextvalue ('SearchforFiles', 'txtNameContainsEntry')
4076
* This places the cursor in the 'txtNameContainsEntry' field.
4080
/** \page selectpanelname selectpanelname
4083
* selectpanelname ('\<window name\>', '\<component name\>', '\<panel name\>')
4085
* \section Description
4087
* Select a panel using the panel name in a list of panels
4089
* \section ImplementationDetails
4091
* \retval 1 on success, else LdtpExecutionError exception
4093
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/panel.c
4097
* from ldtp import *
4099
* With respect to Evolution Contacts
4101
* selectpanelname ('Evolution-Contacts', 'pnlAddbook', 'ldtp')
4103
* \author Khasim Shaheed <khasim.shaheed@gmail.com>
4106
/** \page verifyeventexist verifyeventexist
4109
* verifyeventexist ('\<window name\>', '\<component name\>')
4111
* \section Description
4113
* verifies whether any events are present in a calendar table
4115
* \section ImplementationDetails
4117
* \retval 1 on success, else 0
4119
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/calendar-view.c
4123
* from ldtp import *
4125
* With respect to Evolution-Calendars
4127
* verifyeventexist ('Evolution-Calendars', 'calview')
4129
* \author Manu <manunature@rediffmail.com>
4132
/** \page expandtablecell expandtablecell
4135
* expandtablecell ('<window name\>', '<tree table object name\>', <row\>)
4137
* \section Description
4139
* Expand or contract the tree table cell on a row
4141
* \retval 1 on success, LdtpExecutionError exception on failure
4143
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
4147
* With respect to Evolution Mail component
4149
* from ldtp import *
4151
* expandtablecell ('frm*-Evolution', 'ttblMailFolderTree', 0) # In mail folder view
4156
/** \page gettreetablerowindex gettreetablerowindex
4159
* gettreetablerowindex ('\<window name\>', '\<tree table name\>', '\<name of a table cell\>')
4161
* \section Description
4163
* Used to obtain the index of any table cell whose whose name is give in the last field.
4165
* \section ImplementationDetails
4167
* \retval index of table cell, else -1.
4169
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
4173
* from ldtp import *
4175
* With respect to the tree table in Mail in Evolution
4177
* i = gettreetablerowindex ('Evolution', 'treetblMail', 'Cabinet')
4179
* here 'i' will be having the index of the Cabinet which is a table cell under tree table mail.
4181
* \author Aginesh <sraginesh@novell.com>
4184
/** \page gettablerowindex gettablerowindex
4187
* gettablerowindex ('\<window name\>', '\<tablename\>', '\<cellvalue\>')
4189
* \section Description
4191
* Returns the id of the row containing the given \<cellvalue\>
4193
* \section ImplementationDetails
4195
* \retval Return id of the row containing the given cell value, if it is found else return -1
4197
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
4201
* In case of Evolution Calendar, to select the category form the list of categories
4203
* gettablerowindex ('dlgMeeting', 'tblCategoryList', 'Business')
4205
* The above call would return the row id of the cell containing Business.
4207
* \author Premkumar J <prem.jothimani@gmail.com>
4210
/** \page comboselectindex comboselectindex
4213
* comboselectindex ('\<window name\>', '\<component name\>', \<index\>)
4215
* \section Description
4217
* In combo box, select the list value based on index.
4219
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/combo-box.c
4228
/** \page verifyvisiblebuttoncount verifyvisiblebuttoncount
4231
* verifyvisiblebuttoncount ('<window name\>', '<toolbar name\>', <count\>)
4233
* \section Description
4235
* Verifies whether the toolbar button count matches with the argument count. 1 based index.
4237
* \retval 1 on success, else 0
4241
* With respect to gedit application toolbar
4243
* from ldtp import *
4245
* verifyvisiblebuttoncount ('*-gedit', 'tbar0', 12) # Gedit 2.12 default without any plugin
4247
* \author J Premkumar <prem.jothimani@gmail.com>
4250
/** \page verifybuttoncount verifybuttoncount
4253
* verifybuttoncount ('<window name\>', '<toolbar name\>', <count\>)
4255
* \section Description
4257
* Verifies whether the toolbar button count matches with the argument count. 1 based index.
4259
* \retval 1 on success, else 0
4263
* With respect to gedit application toolbar
4265
* from ldtp import *
4267
* verifybuttoncount ('*-gedit', 'tbar0', 12) # Gedit 2.12 default without any plugin
4269
* \author J Premkumar <prem.jothimani@gmail.com>
4272
/** \page gettextvalue gettextvalue
4275
* gettextvalue ('\<window name\>', '\<component name\>', \<startoffset\>, \<endoffset\>)
4277
* \section Description
4279
* returns the text within the given range in the component given by the component name. \<startoffset\> and \<endoffset\> are optional. If they are ommited, the entire text is returned.
4281
* \retval text data of string type on success, LdtpExecutionError exception on failure
4283
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
4287
* With respect to gnome search tool structure
4289
* gettextvalue ('SearchforFiles', 'txtNameContainsEntry')
4291
* The above statement will return the text present in 'txtNameContainsEntry' field.
4293
* gettextvalue ('SearchforFiles', 'txtNameContainsEntry', 5)
4295
* The above statement will return the text present in 'txtNameContainsEntry' field starting from the fifth character.
4297
* gettextvalue ('SearchforFiles', 'txtNameContainsEntry', 5, 10)
4299
* The above statement will return the text present in 'txtNameContainsEntry' field starting from the fifth character
4301
* till the tenth character.
4303
* \author Premkumar J <prem.jothimani@gmail.com>
4306
/** \page getcellvalue getcellvalue
4309
* getcellvalue ('\<window name\>', '\<component name\>', '\<row\>', '\<column\>')
4311
* \section Description
4313
* returns the text in a cell at given row and column of a tree table
4315
* \retval cell value of type string on success, else LdtpExecutionError exception
4317
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
4318
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
4322
* With respect to Evolution Messages tree table
4324
* gettextvalue ('Evolution-Mail', 'treetblMails', 2, 4)
4326
* This will return the subject of 3rd message in the message list.
4328
* \author Khasim Shaheed <khasim.shaheed@gmail.com>
4329
* \author Premkumar J <prem.jothimani@gmail.com>
4332
/** \page capturetofile capturetofile
4335
* capturetofile ('\<window name\>', '\<combo box name\>'[, '\<file name\>'])
4337
* \section Description
4339
* Capture the list of contents of a combox box to a file. If file name argument is None, then by default the list contents are written to comboboxitem.lst file of current working directory of LDTP engine.
4341
* \retval 1 on success, LdtpExecutionError on failure
4343
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/combo-box.c
4347
* With respect to Find dialog of gedit application
4349
* from ldtp import *
4351
* # Without specifiying the filename
4353
* capturetofile ('dlgFind', 'cboSearchfor')
4355
* # With specifiying the filename
4357
* capturetofile ('dlgFind', 'cboSearchfor', '/tmp/comboboxlistitem.txt') # Note relative path won't work !!!
4359
* \author Premkumar J <prem.jothimani@gmail.com>
4362
/** \page gettextproperty gettextproperty
4365
* gettextproperty ('<window name\>', '<text object name\>'[, <start position\>[, <end position\>]])
4367
* \section Description
4369
* Get the text attributes
4371
* \retval text attributes of type string on success, LdtpExecutionError exception on failure
4373
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
4379
* \author Premkumar J <prem.jothimani@gmail.com>
4382
/** \page comparetextproperty comparetextproperty
4385
* comparetextproperty ('<window name\>', '<text object name\>', '<text property\>'[, <start position\>[, <end position\>]])
4387
* \section Description
4389
* Compares the text attribute properties
4391
* Default value of start and end positions are 0 and length of the string.
4393
* \retval 1 on success, 0 on failure
4395
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
4401
* \author Premkumar J <prem.jothimani@gmail.com>
4404
/** \page containstextproperty containstextproperty
4407
* containstextproperty ('<window name\>', '<text object name\>', '<text property\>'[, <start position\>[, <end position\>]])
4409
* \section Description
4411
* Checks for one or more text attribute properties
4413
* Default value of start and end positions are 0 and length of the string.
4415
* \retval 1 on success, 0 on failure
4417
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/text.c
4423
* \author Premkumar J <prem.jothimani@gmail.com>
4426
/** \page selectcalendardate selectcalendardate
4429
* selectcalendardate ('\<window name\>', '\<calendar object name\>', \<day\>, \<month\>, \<year\>)
4431
* \section Description
4435
* \retval 1 on success, LdtpExecutionError exception on failure
4437
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/calendar.c
4443
* \author Premkumar J <prem.jothimani@gmail.com>
4446
/** \page remap remap
4449
* remap ('\<window name\>'[, '\<component name\>'])
4451
* undoremap ('\<application-name\>', '\<dialog name\>')
4453
* \section Description
4455
* We can handle dynamically created widgets (meaning widgets created at run time) using this remap function. Calling remap will generate appmap for the given dialog at run time and update the hash table. Then we can access the new widgets. But please make sure to call undoremap() once the required functions are performed so that the hash table will be reverted back to its original state. The reason for having undoremap() is that subsequent calls to remap() might corrupt the hash table containg the appmap entries.
4457
* Please not that the <application-name> should be same as the one given as the commmand-line argument for appmap generation.
4459
* \section ImplementationDetails
4461
* It uses the same logic that appmap module uses to generate appmap. Please refer to the following link for the source code of the remap functionality
4463
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/remap.c
4467
* remap ('dlggeditPreferences') # Remaps the complete gedit preferences dialog
4469
* remap ('dlggeditPreferences', 'ptabView') # Remaps all the controls under page tab with the name View of gedit Preferences dialog.
4473
* undoremap ('evolution', 'dlgAppointment-Nosummary')
4475
* \author Premkumar J <prem.jothimani@gmail.com>
4478
/** \page getwindowlist getwindowlist
4483
* \section Description
4485
* Gets all the window name, that are currently opened. If none of the windows are opened, then LdtpExecutionError will be thrown.
4487
* \retval list of window names will be returned on success, LdtpExecutionError exception on failure
4489
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
4493
* from ldtp import *
4497
* \author Premkumar J <prem.jothimani@gmail.com>
4500
/** \page getwindowsize getwindowsize
4503
* getwindowsize ('\<window name\>')
4505
* \section Description
4507
* Get the window size, of the given window name. If window does not exist, then LdtpExecutionError will be thrown.
4509
* \retval x, y, width, height as a list and as int type will be returned on success, LdtpExecutionError exception on failure
4511
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/ldtp-gui.c
4515
* launchapp ('gedit')
4517
* getwindowsize ('*-gedit')
4519
* \author Nagappan Alagappan <nagappan@gmail.com>
4522
/** \page getobjectsize getobjectsize
4525
* getobjectsize ('\<window name\>'[, '\<object name\>'])
4527
* \section Description
4529
* Get the object size, of the given window. If object does not exist, then LdtpExecutionError will be thrown.
4531
* \retval x, y, width, height as a list and as int type will be returned on success, LdtpExecutionError exception on failure
4533
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/ldtp-gui.c
4537
* launchapp ('gedit')
4539
* getobjectsize ('*-gedit', 'btnFind')
4541
* \author Nagappan Alagappan <nagappan@gmail.com>
4544
/** \page getapplist getapplist
4549
* \section Description
4551
* Will return all the accessibility application window title that are currently opened
4553
* \retval list of window names will be returned on success, LdtpExecutionError exception on failure
4555
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
4559
* from ldtp import *
4561
* getapplist () # Will return all the accessibility application window title that are currently opened
4563
* \author Nagappan Alagappan <nagappan@gmail.com>
4566
/** \page getallstates getallstates
4569
* getallstates ('\<window name\>'[, '\<component name\>'])
4571
* \section Description
4573
* Will return all the accessibility states of given object information
4575
* \retval list of states will be returned on success, LdtpExecutionError exception on failure
4577
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
4581
* from ldtp import *
4583
* getallstates () # Will return all the accessibility states of given
4584
* object information
4585
* Compare all the states based on your requirement, say for example,
4586
* if interested in checking for VISIBLE state, then:
4588
* states = getallstates ('*-gedit', 'btnCopy')
4589
* if state.VISIBLE in states:
4590
* print 'Object is visible'
4592
* \author Nagappan Alagappan <nagappan@gmail.com>
4595
/** \page getchild getchild
4598
* getchild ('\<window name\>'<[, '\<component name\>'], [ '\<role\>']>)
4600
* \section Description
4602
* Gets the list of object available in the window, which matches
4603
* component name or role name or both.
4605
* \retval List of objects on success, LdtpExecutionError exception on failure
4607
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
4611
* With respect to Find object of gedit application
4613
* from ldtp import *
4615
* getchild ('*-gedit', 'Find')
4617
* getchild ('*-gedit', role = 'push button')
4619
* getchild ('*-gedit', 'Find', role = 'push button')
4621
* \author Nagappan Alagappan <nagappan@gmail.com>
4624
/** \page getobjectlist getobjectlist
4627
* getobjectlist ('\<window name\>')
4629
* \section Description
4631
* Gets the list of object available in the window (if window exist, else exception will be thrown)
4633
* \retval List of objects on success, LdtpExecutionError exception on failure
4635
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
4639
* With respect to Find dialog of gedit application
4641
* from ldtp import *
4643
* getobjectlist ('dlgFind')
4645
* \author Premkumar J <prem.jothimani@gmail.com>
4648
/** \page getobjectinfo getobjectinfo
4651
* getobjectinfo ('\<window name\>', '\<object name\>')
4653
* \section Description
4655
* Gets the list of object information lik class, parent, label, label_by, child_index
4657
* \retval list of object properies (example, class, parent, label, label_by, child_index) on success, LdtpExecutionError exception on failure
4659
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
4663
* With respect to gedit Find dialog
4665
* from ldtp import *
4667
* getobjectinfo ('dlgFind', 'btnFind')
4672
/** \page getobjectproperty getobjectproperty
4675
* getobjectproperty ('<window name\>', '<object name\>', '\<object property\>')
4677
* \section Description
4679
* Get the object property if available, else exception will be thrown
4681
* \retval object property string on success, LdtpExecutionError exception on failure
4683
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
4687
* With respect to find dialog of gedit application
4689
* from ldtp import *
4691
* getobjectproperty ('dlgFind', 'btnFind', 'label') # Returns '_Find' string in US.English locale
4693
* \author Premkumar J <prem.jothimani@gmail.com>
4696
/** \page doubleclickrow doubleclickrow
4699
* doubleclickrow ('\<window name\>', '\<table name\>', '\<value of row in first column\>')
4701
* \section Description
4703
* Double clicks the row in table whose first column's (0th column) value is same as the contents of the third argument in the function call.
4705
* \retval 1 on success, else 0.
4707
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
4708
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
4714
* \author Premkumar J <prem.jothimani@gmail.com>
4717
/** \page doubleclickrowindex doubleclickrowindex
4720
* doubleclickrowindex ('\<window name\>', '\<table name\>', \<row index\>)
4722
* \section Description
4724
* Double clicks the row in table whose first column's (0th column) value is same as the contents of the third argument in the function call.
4726
* \retval 1 on success, else 0.
4728
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
4729
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
4735
* \author Nagappan Alagappan <nagappan@gmail.com>
4738
/** \page singleclickrow singleclickrow
4741
* singleclickrow ('\<window name\>', '\<table name\>', '\<value of row in first column\>')
4743
* \section Description
4745
* Single clicks the row in table whose first column's (0th column) value is same as the contents of the third argument in the function call.
4747
* \retval 1 on success, else 0.
4749
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
4750
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/table.c
4756
* \author Premkumar J <prem.jothimani@gmail.com>
4759
/** \page doubleclick doubleclick
4762
* doubleclick ('\<window name\>', '\<component name\>')
4764
* \section Description
4766
* Double clicks the row in table whose first column's (0th column) value is same as the contents of the third argument in the function call.
4768
* \retval 1 on success, else 0
4770
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/tree-table.c
4776
* \author Premkumar J <prem.jothimani@gmail.com>
4779
/** \page listsubmenus listsubmenus
4782
* listsubmenus ('window name\>', 'menu name\>')
4784
* \section Description
4786
* Get the list of sub menu item, in a menu in a ; seperated list
4788
* \retval ';' seperated string on success, LdtpExecutionError exception on failure
4790
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/menu-item.c
4794
* With respect to gedit application, File menu
4796
* from ldtp import *
4798
* listsubmenus ('*-gedit', 'mnuFile') # all the submenus of File menu in ';' seperated string
4800
* \author Nagappan Alagappan <nagappan@gmail.com>
4803
/** \page invokemenu invokemenu
4806
* invokemenu ('window name\>', 'object name\>')
4808
* \section Description
4810
* Invokes the menu in an embedded component (accessible) type
4812
* \retval 1 on success, LdtpExecutionError exception on failure
4814
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/embedded-component.c
4818
* With respect to gedit application, File menu
4820
* from ldtp import *
4822
* invokemenu ('frmBottomExpandedEdgePanel', 'Volume Control')
4824
* \author Nagappan Alagappan <nagappan@gmail.com>
4827
/** \page verifyscrollbar verifyscrollbar
4830
* verifyscrollbar ('<window name\>', '<scroll bar name\>')
4832
* \section Description
4834
* Checks whether the given object is scrollbar or not, also we can check whether scroll bar object is available or not
4836
* \retval 1 on success, else 0
4838
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/scroll-bar.c
4842
* With respect to gedit application
4844
* from ldtp import *
4846
* verifyscrollbar ('*-gedit', 'scbr0') # assuming that the file currently opened content is more than one page, else the scrollbar object will not be created by accessibility interface
4848
* \author Nagappan Alagappan <nagappan@gmail.com>
4851
/** \page verifyscrollbarhorizontal verifyscrollbarhorizontal
4854
* verifyscrollbarhorizontal ('<window name\>', '<scroll bar name\>')
4856
* \section Description
4858
* Checks whether the given object is horizontal scrollbar or not
4860
* \retval 1 on success, else 0
4862
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/scroll-bar.c
4866
* With respect to gedit application
4868
* from ldtp import *
4870
* verifyscrollbarhorizontal ('*-gedit', 'scbr0') # assuming that you have more columns than the actual visible area, else the scrollbar object will not be created by accessibility interface
4872
* \author Nagappan Alagappan <nagappan@gmail.com>
4875
/** \page verifyscrollbarvertical verifyscrollbarvertical
4878
* verifyscrollbarvertical ('<window name\>', '<scroll bar name\>')
4880
* \section Description
4882
* Checks whether the given object is vertical scrollbar or not
4884
* \retval 1 on success, else 0
4886
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/scroll-bar.c
4890
* With respect to gedit application
4892
* from ldtp import *
4894
* verifyscrollbarhorizontal ('*-gedit', 'scbr0') # assuming that you have more columns than the actual visible area, else the scrollbar object will not be created by accessibility interface
4896
* \author Nagappan Alagappan <nagappan@gmail.com>
4899
/** \page verifyslider verifyslider
4902
* verifyslider ('<window name\>', '<slider name\>')
4904
* \section Description
4908
* \retval 1 on success, else 0
4910
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/slider.c
4916
* \author Nagappan Alagappan <nagappan@gmail.com>
4919
/** \page verifysliderhorizontal verifysliderhorizontal
4922
* verifysliderhorizontal ('<window name\>', '<slider name\>')
4924
* \section Description
4928
* \retval 1 on success, else 0
4930
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/slider.c
4936
* \author Nagappan Alagappan <nagappan@gmail.com>
4939
/** \page verifyslidervertical verifyslidervertical
4942
* verifyslidervertical ('<window name\>', '<slider name\>')
4944
* \section Description
4948
* \retval 1 on success, else 0
4950
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/slider.c
4956
* \author Nagappan Alagappan <nagappan@gmail.com>
4959
/** \page onwindowcreate onwindowcreate
4962
* onwindowcreate ('<window title\>', '<callback function\>'[,
4963
* <arguments to callback function\>])
4965
* \section Description
4967
* Watch, window create event, with the given title and call the respective callback function. Window title supports regular expression too.
4969
* \retval 1 on success, else LdtpExecutionError exception
4972
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
4973
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/ldtp-gui.c
4977
* With respect to gedit application, replace dialog
4981
* from ldtp import *
4984
* callbackRunning = threading.Event()
4985
* callbackRunning.clear()
4986
* callbackState = threading.Event()
4987
* callbackState.clear()
4990
* callbackState.set()
4991
* waittillguiexist('dlgReplace')
4992
* click('dlgReplace', 'btnClose')
4993
* callbackState.clear()
4994
* callbackRunning.set()
4995
* print 'callbackend'
4997
* def cbwithvarargs(*args):
5000
* print 'callbackend'
5002
* onwindowcreate('Replace', cb)
5003
* onwindowcreate('dlgFind', cbwithvarargs, 'test', 'var', 'args')
5005
* click('*gedit', 'btnReplace')
5006
* click('*gedit', 'btnFind')
5008
* waittillguiexist('dlgFind')
5009
* click('dlgFind', 'btnClose')
5011
* if callbackState.isSet():
5012
* print 'Waiting for callback to complete'
5013
* callbackRunning.wait()
5014
* print 'callbackset'
5019
* \author Nagappan Alagappan <nagappan@gmail.com>
5022
/** \page removecallback removecallback
5025
* removecallback ('<window title\>')
5027
* \section Description
5029
* Remove the callback function that was registered with onwindowcreate
5031
* \retval 1 on success, else LdtpExecutionError exception
5034
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
5035
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/ldtp-gui.c
5039
* With respect to gedit application, replace dialog
5043
* from ldtp import *
5048
* callbackRunning = threading.Event ()
5050
* callbackRunning.clear ()
5052
* callbackState = threading.Event ()
5054
* callbackState.clear ()
5059
* callbackState.set ()
5061
* waittillguiexist ('dlgReplace')
5063
* click ('dlgReplace', 'btnClose')
5065
* callbackState.clear ()
5067
* callbackRunning.set ()
5069
* print 'callbackend'
5072
* onwindowcreate ('Replace', cb)
5074
* click ('*gedit', 'btnReplace')
5076
* click ('*gedit', 'btnFind')
5078
* waittillguiexist ('dlgFind')
5080
* click ('dlgFind', 'btnClose')
5082
* if callbackState.isSet ():
5084
* print 'Waiting for callback to complete'
5086
* callbackRunning.wait ()
5088
* print 'callbackset'
5092
* removecallback ('Replace')
5096
* \author Nagappan Alagappan <nagappan@gmail.com>
5099
/** \page doesmenuitemexist doesmenuitemexist
5102
* doesmenuitemexist ('\<window name\>', '\<menu hierarchy\>')
5104
* \section Description
5106
* checks if the specified menuitem specified in the menu hierarchy is present or not
5108
* \section ImplementationDetails
5110
* \retval 1 if the menuitem is present, else 0
5112
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/menu-item.c
5116
* With respect to gedit menu structure
5118
* doesselectmenuitem ('gedit', 'mnuFile;mnuNew')
5120
* this function is required mainly to check those menuitems which will not be present always. An example of this kind of a menuitem is the close tab menu item under menu file in firefox web browser.
5122
* \author J Premkumar <prem.jothimani@gmail.com>
5125
/** \page startlog startlog
5128
* startlog ('\<log file name\>', [[0 or 1], ['\<screenshot directory\>']])
5130
* second argument is optional and 1 is default value
5132
* 0 - Append log to an existing file
5134
* 1 - Write log to a new file. If file already exist, then erase
5135
* existing file content and start log
5137
* Screenshot files has to be placed in screenshot directory
5139
* \section Description
5141
* Start logging on the specified file. Default log level set is logging.WARNING. Though this can be changed with setloglevel LDTP API.
5143
* \section ImplementationDetails
5144
* Log file will be created if log file is not present in any case. If second argument is 1, then existing file content will be erased. If second argument is 0, then new logs will be append to existing log.
5146
* \retval 1 on Success and 0 on error
5150
* If we want to overwrite existing log file or create new log file:
5152
* startlog ('evolution.xml', 1)
5154
* If we want to append existing log file or create new log file:
5156
* startlog ('evolution.xml', 0)
5160
* startlog ('evolution.xml')
5164
* startlog ('~/evolution.xml', screenshotdir = '~/screenshot')
5165
* evolution.xml log file will ge generated in home directory of
5166
* current user and the screenshot files will be placed screenshot
5167
* folder of current user's home directory.
5169
* \author Nagappan Alagappan <nagappan@gmail.com>
5172
/** \page stoplog stoplog
5177
* \section Description
5181
* \section ImplementationDetails
5182
* If a log file has been previously opened for logging, that file pointer will be closed. So that the new logging will not be appened to the log file.
5188
* \author Nagappan Alagappan <nagappan@gmail.com>
5192
/** \page startldtplog startldtplog
5195
* startldtplog ('\<log file name\>', [0 or 1])
5197
* second argument is optional and 1 is default value
5199
* 0 - Append ldtplog to an existing file
5201
* 1 - Write ldtp log to a new file. If file already exist, then erase existing file content and start ldtp log
5203
* \section Description
5205
* Start ldtp logging on the specified file
5207
* \section ImplementationDetails
5208
* Log file will be created if log file is not present in any case. If second argument is 1, then existing file content will be erased. If second argument is 0, then new logs will be append to existing log.
5210
* \retval 1 on Success and 0 on error
5214
* If we want to overwrite existing log file or create new log file:
5216
* startldtplog ('evolution.xml', 1)
5218
* If we want to append existing log file or create new log file:
5220
* startldtplog ('evolution.xml', 0)
5224
* startldtplog ('evolution.xml')
5226
* \author Nagappan Alagappan <nagappan@gmail.com>
5229
/** \page stopldtplog stopldtplog
5234
* \section Description
5238
* \section ImplementationDetails
5239
* If a log file has been previously opened for logging, that file pointer will be closed. So that the new logging will not be appened to the log file.
5245
* \author Nagappan Alagappan <nagappan@gmail.com>
5248
/** \page imagecapture imagecapture
5251
* imagecapture ([\<window name\>, [\<output file\>, (opt)\<width-x\>, (opt)\<height-y\>, (opt)x, (opt)y]])
5253
* \section Description
5255
* Capture snap-shot of the window. Where startx & starty are offset. If window name is not provided, then the complete X screen is captured. If output file name is not provided, then a temporary file will be created and the file name will be returned. File has to be explicitly deleted by the user.
5257
* \section ImplementationDetails
5259
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5263
* from ldtputils import *
5265
* imagecapture ('Terminal', 'out.png') # out.jpg will be created in current directory. Give absolute path to save it in some other directory.
5267
* imagecapture () # Captures the complete X screen and saves in a temp file and returns the file name.
5269
* \note Window title name is case sensitive
5271
* \section Dependency
5273
* Digwin binary - http://sourceforge.net/projects/ltfx If a specific window has to be captured, then digwin is used to get the window id.
5275
* Import utility of ImageMagick - http://www.imagemagick.org/script/import.php # Mandatory dependency, if you want to use this function.
5277
* \author Nagashree <mnagashree@novell.com>
5280
/** \page imagecompare imagecompare
5283
* imagecompare (imgfile1, imgfile2)
5285
* \section Description
5287
* Compares two images and returns difference of them in percentage. If PIL package is not installed, LdtpExecutionError exception will be thrown.
5289
* \retval difference in percentage on successful image comaprison, else LdtpExecutionError exception
5291
* Note: Script designer can decide the pass / fail criteria based on the diff percentage.
5293
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5297
* from ldtputils import *
5299
* imagecompare ('in.jpg', 'out.jpg') # Assuming that in.jpg and out.jpg are in current directory. File path should be absolute path.
5301
* \section Dependency
5303
* Python Imaging Library - http://www.pythonware.com/products/pil/
5305
* \author Shankar Ganesh <shagan.glare@gmail.com>
5306
* \author Veerapuram Varadhan <v.varadhan@gmail.com>
5309
/** \page blackoutregion blackoutregion
5312
* blackoutregion (infile, outfile, topx, topy, botx, boty)
5314
* \section Description
5316
* Blacks out the region in the image given by
5318
* top-coords - topx,topy bottom-coords - botx,boty
5322
* \section ImplementationDetails
5324
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5328
* blackoutregion ('in.jpg','out.jpg',100,100,200,200)
5330
* \section Dependency
5332
* Python Imaging Library - http://www.pythonware.com/products/pil/
5334
* \author Shankar Ganesh <shagan.glare@gmail.com>
5337
/** \page Classpstats Class pstats
5340
* \<Object\> = pstats(\<application name\>, \<time interval\>)
5342
* \<Object\>.start()
5346
* \section Description
5348
* This process when run gathers the Memory usage and CPU utilization of all the processes of a particular application at specific time interval.
5350
* \section ImplementationDetails
5352
* When this functionality is to be used in a python test script you need to create a new object for pstats class.
5354
* The arguments passed while instantiating this class are Application name and Time interval.
5356
* As soon as the \<Object\>.start() method is called in the test script, memory usage and CPU utilization of the application start getting logged into the ldtp log file.
5358
* When \<Object\>.stop is called the thread gathering the information stops.
5360
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5364
* If I want the resource usage of all processes related to evolution to be logged every 2 seconds, the following statements need to be incorporated in the test script
5366
* xstats = pstats ('evolution', 2)
5374
* \section Dependency
5376
* This functionality depends on the pystatgrab (http://www.i-scream.org/pystatgrab/) package. Make sure you have it installed before using this memory and CPU utilization gathering function in your ldtp test scripts.
5378
* \author Subodh Soni <subodhsoni@gmail.com>
5384
* wait ([\<number of seconds to suspend current execution\>])
5386
* \section Description
5388
* Suspend execution for the specified time period. Default wait time is 5 seconds.
5390
* \note Time in seconds.
5392
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5396
* To suspend the current sequence of execution for 5 seconds
5398
* from ldtputils import *
5402
* \author Nagappan Alagappan <nagappan@gmail.com>
5403
* \author Shankar Ganesh <shagan.glare@gmail.com>
5407
/** \page launchapp launchapp
5410
* launchapp ('\<application binary name\>'[, argument] [,use additional environment variables for accessibility])
5412
* second and third arguments are optional. environment default argument is 1. So the GTK_MODULES and GNOME_ACCESSIBILITY will be set and added to the enivronment variable. Currently the second argument is applicable only when the test is run in local environment.
5414
* Second argument is a list, if executed from local session and the same argument is used as sleep time for remote session, but as a single integer value.
5416
* NOTE: Incase of remote session, the command line arguments should be part of application name
5418
* \section Description
5420
* Application name specified as an argument will be launched.
5422
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtp.py
5426
* Launch file-roller application.
5428
* from ldtp import *
5430
* launchapp ('file-roller')
5432
* launchapp ('gaim', env = 1) # Invoke the application after setting environment variables
5434
* launchapp ('file-roller', ['/home/ldtp/test.tar.gz'], env = 0) # Invoke the application with optional command line argument
5436
* \author Nagappan Alagappan <nagappan@gmail.com>
5437
* \author Shankar Ganesh <shagan.glare@gmail.com>
5441
/** \page launchapp2 launchapp2
5444
* launchapp2 ('\<application binary name\>'[, '\<application under test\>' = None[, callAut = False]])
5446
* Calls appundertest for the user.
5448
* Implicit call to appundertest.
5450
* * This is usually what a user mean when he calls launchapp.
5451
* * A newbie user could call appunder very far away from launchapp, and we don't know
5452
* what could be the consequences of that.
5455
* \section Description
5457
* Application name specified as an argument will be launched.
5459
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5463
* from ldtp import *
5465
* launchapp2 ('file-roller')
5467
* launchapp ('file-roller', callAut = True)
5469
* launchapp2 ('gedit', 'gedit', callAut = True)
5471
* \author Sandro Millien <msp@lloedy.com>
5475
/** \page getactivewin getactivewin
5480
* \section Description
5484
* \retval The active window title string.
5486
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5490
* title = getactivewin ()
5492
* print 'Current active window title - ' + title
5494
* Gets the current active window title (window that is currently in focus).
5496
* \section Dependency
5498
* ltfx binary - http://sourceforge.net/projects/ltfx
5500
* \author Nagappan Alagappan <nagappan@gmail.com>
5501
* \author Shankar Ganesh <shagan.glare@gmail.com>
5505
/** \page windowexists windowexists
5508
* windowexists ('\<window name\>')
5510
* \section Description
5512
* Check window name exists with the given name.
5514
* \retval 1 if window exist and 0 otherwise.
5516
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5520
* windowexists ('Mozilla Firefox')
5522
* \section Dependency
5524
* ltfx binary - http://sourceforge.net/projects/ltfx
5526
* \author Nagappan Alagappan <nagappan@gmail.com>
5527
* \author Shankar Ganesh <shagan.glare@gmail.com>
5531
/** \page partialexists partialexists
5534
* partialexists ('\<window name\>')
5536
* \section Description
5538
* Check window name partially matches with the given name.
5540
* \retval 1 if window exist and 0 otherwise.
5542
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5546
* partialexists ('Firefox')
5548
* \section Dependency
5550
* ltfx binary - http://sourceforge.net/projects/ltfx
5552
* \author Nagappan Alagappan <nagappan@gmail.com>
5553
* \author Shankar Ganesh <shagan.glare@gmail.com>
5557
/** \page activatewinpartialname activatewinpartialname
5560
* activatewinpartialname ('\<window name\>')
5562
* \section Description
5564
* Activate window based on the given name that matches partially.
5566
* \retval 1 if window exist and 0 otherwise.
5568
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5572
* activatewinpartialname ('Firefox')
5574
* \section Dependency
5576
* ltfx binary - http://sourceforge.net/projects/ltfx
5578
* \author Nagappan Alagappan <nagappan@gmail.com>
5579
* \author Shankar Ganesh <shagan.glare@gmail.com>
5583
/** \page typekey typekey
5586
* typekey ('\<string to be typed\>')
5588
* \section Description
5590
* On the current focus area, the string given as argument will be typed.
5592
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5594
* \section ImplementationDetails
5596
* \retval 1 if window exist and 0 otherwise.
5598
* This function supports
5600
* \<alt\> - for alt key
5602
* \<ctrl\> - for control key
5604
* \<shift\> - for pressing shift key
5606
* \<enter\> - for pressing enter key
5608
* \<tab\> - for pressing tab key
5610
* \<del\> - for pressing del key
5612
* \<bksp\> - for pressing back space key
5614
* \<f1\> - for pressing F1 function key
5618
* \<f12\> - for pressing F1 function key
5620
* \<up\> - for pressing up arrow key
5622
* \<down\> - for pressing down arrow key
5624
* \<right\> - for pressing right arrow key
5626
* \<left\> - for pressing left arrow key
5628
* \<esc\> - for pressing escape key
5630
* \<space\> - for pressing space bar
5632
* \<home\> - for pressing home key
5634
* \<end\> - for pressing end key
5636
* \<pageup\> - for pressing page up key
5638
* \<pagedown\> - for pressing page down key
5640
* \<prtscrn\> - for pressing print screen key
5645
* typekey ('\<tab\>testing LDTP using ltfx\<enter\>')
5647
* Intially a tab key will be pressed and then text will be typed and then enter key will be pressed
5649
* \section Dependency
5651
* ltfx binary - http://sourceforge.net/projects/ltfx
5653
* \author Nagappan Alagappan <nagappan@gmail.com>
5654
* \author Shankar Ganesh <shagan.glare@gmail.com>
5658
/** \page activatewin activatewin
5661
* activatewin ('\<window name\>')
5663
* \section Description
5665
* Activate window based on the given name.
5667
* \retval 1 if window exist and 0 otherwise.
5669
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5673
* activatewin ('Mozilla Firefox')
5675
* \section Dependency
5677
* ltfx binary - http://sourceforge.net/projects/ltfx
5679
* \author Nagappan Alagappan <nagappan@gmail.com>
5680
* \author Shankar Ganesh <shagan.glare@gmail.com>
5684
/** \page waitwinname waitwinname
5687
* waitwinname ('\<window name\>')
5689
* \section Description
5691
* Wait for window with the given name to appear.
5693
* \retval 1 if window exist and 0 otherwise.
5695
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5699
* waitwinname ('Mozilla Firefox')
5701
* \section Dependency
5703
* ltfx binary - http://sourceforge.net/projects/ltfx
5705
* \author Nagappan Alagappan <nagappan@gmail.com>
5706
* \author Shankar Ganesh <shagan.glare@gmail.com>
5710
/** \page waitwinpartialname waitwinpartialname
5713
* waitwinpartialname ('\<window name\>')
5715
* \section Description
5717
* Wait for window with the given name partially matches to appear.
5719
* \retval 1 if window exist and 0 otherwise.
5721
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5725
* waitwinpartialname ('Firefox')
5727
* \section Dependency
5729
* ltfx binary - http://sourceforge.net/projects/ltfx
5731
* \author Nagappan Alagappan <nagappan@gmail.com>
5732
* \author Shankar Ganesh <shagan.glare@gmail.com>
5736
/** \page windowuptime windowuptime
5739
* windowuptime(['\<window name\>'])
5741
* \section Description
5743
* Give the window up time
5745
* \retval startime, endtime (python datetime object)
5747
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5751
* windowuptime('dlgChatWindow')
5753
* \author Nagappan Alagappan <nagappan@gmail.com>
5757
/** \page activatewindow activatewindow
5760
* activatewindow(['\<window name\>'])
5762
* \section Description
5764
* Activate window based on the given name, default None. If None,
5765
* will activate all window one by one
5769
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5773
* activatewindow('Mozilla Firefox')
5775
* \section Dependency
5777
* wnck, pygtk python library
5779
* \author Nagappan Alagappan <nagappan@gmail.com>
5780
* \author Arvind Patil <apatil@vmware.com>
5784
/** \page maximizewindow maximizewindow
5787
* maximizewindow(['\<window name\>'])
5789
* \section Description
5791
* Maximize window based on the given name, default None. If None,
5792
* will maximize all window one by one
5796
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5800
* maximizewindow('Mozilla Firefox')
5802
* \section Dependency
5804
* wnck, pygtk python library
5806
* \author Nagappan Alagappan <nagappan@gmail.com>
5807
* \author Arvind Patil <apatil@vmware.com>
5811
/** \page minimizewindow minimizewindow
5814
* minimizewindow(['\<window name\>'])
5816
* \section Description
5818
* Minimize window based on the given name, default None. If None,
5819
* will minimize all window one by one
5823
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5827
* minimizewindow('Mozilla Firefox')
5829
* \section Dependency
5831
* wnck, pygtk python library
5833
* \author Nagappan Alagappan <nagappan@gmail.com>
5834
* \author Arvind Patil <apatil@vmware.com>
5838
/** \page closewindow closewindow
5841
* closewindow(['\<window name\>'])
5843
* \section Description
5845
* Close window based on the given name, default None. If None,
5846
* will close all window one by one
5850
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtputils.py
5854
* closewindow('Mozilla Firefox')
5856
* \section Dependency
5858
* wnck, pygtk python library
5860
* \author Nagappan Alagappan <nagappan@gmail.com>
5861
* \author Arvind Patil <apatil@vmware.com>
5865
/** \page getpanelchildcount getpanelchildcount
5868
* getpanelchildcount ('\<window name\>', '\<component name\>')
5870
* \section Description
5872
* Gets the number of childs available under the given panel
5874
* \retval Returns the child count if present, else -1, if unable to find child count
5876
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/panel.c
5880
* With respect to gedit application
5882
* from ldtp import *
5884
* getpanelchildcount ('*-gedit', 'pnl0')
5886
* \author Nagappan Alagappan <nagappan@gmail.com>
5890
/** \page bindtext bindtext
5893
* bindtext ('\<package name\>', '\<locale directory\>'[, '\<mode\>'])
5895
* \section Description
5899
* \retval Returns 1 on success, LdtpExecutionError exception will be thrown on failure
5902
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
5903
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/localization.c
5907
* For mo file with name: "/opt/gnome/share/locale/ta/LC_MESSAGES/gedit.mo"
5909
* bindtext ('gedit', '/opt/gnome/share/locale')
5911
* \author Premkumar J <prem.jothimani@gmail.com>
5915
/** \page setlocale setlocale
5918
* setlocale (['\<LANG\>'])
5920
* \section Description
5924
* \retval Returns 1 on success, LdtpExecutionError exception will be thrown on failure
5927
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
5928
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/localization.c
5934
* \author Premkumar J <prem.jothimani@gmail.com>
5938
/** \page setloglevel setloglevel
5941
* setloglevel (\<log level\>)
5945
* List of log levels are available here - http://docs.python.org/lib/module-logging.html
5947
* \section Description
5949
* Set the log level, which will be used in client side logging. Default log level set is logging.WARNING
5951
* \section ImplementationDetails
5953
* Implemented based on python logging formats
5955
* \retval Returns 1 on success, 0 on failure
5957
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtp.py
5961
* setloglevel (logging.WARNING)
5963
* \author Nagappan Alagappan <nagappan@gmail.com>
5967
/** \page addlogger addlogger
5970
* addlogger ('\<log configuration file\>')
5972
* \section Description
5974
* Add more python logging formats with a configuration file format based on python logging format
5976
* \section ImplementationDetails
5978
* Implemented based on python logging formats
5980
* \retval Returns 1 on success
5982
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtp.py
5986
* addlogger ('/etc/ldtp.conf')
5988
* \section Configration
5990
* Refer: Python logging format configuration file
5992
* \author Nagappan Alagappan <nagappan@gmail.com>
5996
/** \page mouseleftclick mouseleftclick
5999
* mouseleftclick ('\<window name\>', '\<object name\>')
6001
* \section Description
6005
* \retval Returns 1 on success, LdtpExecutionError exception will be thrown on failure
6007
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/device.c
6013
* \author Prashanth Mohan <prashmohan@gmail.com>
6017
/** \page mouserightclick mouserightclick
6020
* mouserightclick ('\<window name\>', '\<object name\>')
6022
* \section Description
6026
* \retval Returns 1 on success, LdtpExecutionError exception will be thrown on failure
6028
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/device.c
6034
* \author Prashanth Mohan <prashmohan@gmail.com>
6038
/** \page mousemove mousemove
6041
* mousemove ('\<window name\>', '\<object name\>')
6043
* \section Description
6047
* \retval Returns 1 on success, LdtpExecutionError exception will be thrown on failure
6049
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/device.c
6055
* \author Prashanth Mohan <prashmohan@gmail.com>
6059
/** \page enterstring enterstring
6062
* enterstring ('\<window name\>', '\<object name\>', '\<data\>')
6064
* \section Description
6066
* Functionality of enterstring is similar to typekey of LTFX project. Main difference is this function works based on accessibility. So, we could specify the window name, object name and finally the data string.
6068
* \retval Returns 1 on success, LdtpExecutionError exception will be thrown on failure
6070
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/device.c
6074
* enterstring ('*-gedit', 'txt0', 'Testing LDTP\'s enterstring function')
6076
* This function supports
6078
* \<alt\> - for alt key
6080
* \<ctrl\> - for control key
6082
* \<shift\> - for pressing shift key
6084
* \<enter\> - for pressing enter key
6086
* \<tab\> - for pressing tab key
6088
* \<del\> - for pressing del key
6090
* \<bksp\> - for pressing back space key
6092
* \<f1\> - for pressing F1 function key
6096
* \<f12\> - for pressing F1 function key
6098
* \<up\> - for pressing up arrow key
6100
* \<down\> - for pressing down arrow key
6102
* \<right\> - for pressing right arrow key
6104
* \<left\> - for pressing left arrow key
6106
* \<esc\> - for pressing escape key
6108
* \<space\> - for pressing space bar
6110
* \<home\> - for pressing home key
6112
* \<end\> - for pressing end key
6114
* \<pageup\> - for pressing page up key
6116
* \<pagedown\> - for pressing page down key
6118
* \<prtscrn\> - for pressing print screen key
6121
* \author Prashanth Mohan <prashmohan@gmail.com>
6125
/** \page generatekeyevent generatekeyevent
6128
* generatekeyevent ('\<data\>')
6130
* \section Description
6132
* Functionality of generatekeyevent is similar to typekey of LTFX project.
6134
* \section ImplementationDetails
6136
* Used SPI_generateKeyboardEvent to generate the keyboard events.
6138
* \retval Returns 1 on success, LdtpExecutionError exception will be thrown on failure
6140
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/device.c
6144
* generatekeyevent ('Testing LDTP\'s enterstring function')
6146
* This function supports
6148
* \<alt\> - for alt key
6150
* \<ctrl\> - for control key
6152
* \<shift\> - for pressing shift key
6154
* \<enter\> - for pressing enter key
6156
* \<tab\> - for pressing tab key
6158
* \<del\> - for pressing del key
6160
* \<bksp\> - for pressing back space key
6162
* \<f1\> - for pressing F1 function key
6166
* \<f12\> - for pressing F1 function key
6168
* \<up\> - for pressing up arrow key
6170
* \<down\> - for pressing down arrow key
6172
* \<right\> - for pressing right arrow key
6174
* \<left\> - for pressing left arrow key
6176
* \<esc\> - for pressing escape key
6178
* \<space\> - for pressing space bar
6180
* \<home\> - for pressing home key
6182
* \<end\> - for pressing end key
6184
* \<pageup\> - for pressing page up key
6186
* \<pagedown\> - for pressing page down key
6188
* \<prtscrn\> - for pressing print screen key
6190
* NOTE: \<\<\> - To enter \< symbol, it has to be escaped within \<\>
6193
* \author Prashanth Mohan <prashmohan@gmail.com>
6197
/** \page keyrelease keyrelease
6200
* keyrelease ('\<data\>')
6202
* \section Description
6204
* Functionality of keyrelease is similar to typekey of LTFX project.
6206
* \section ImplementationDetails
6208
* Used SPI_generateKeyboardEvent to generate the keyboard events.
6210
* \retval Returns 1 on success, LdtpExecutionError exception will be thrown on failure
6212
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/device.c
6216
* keypress ('\<shift\>');generatekeyevent ('hELLO');keyrelease ('\<shift\>');generatekeyevent ('\<space\>World')
6218
* This function supports
6220
* \<alt\> - for alt key
6222
* \<ctrl\> - for control key
6224
* \<shift\> - for pressing shift key
6226
* \<enter\> - for pressing enter key
6228
* \<tab\> - for pressing tab key
6230
* \<del\> - for pressing del key
6232
* \<bksp\> - for pressing back space key
6234
* \<f1\> - for pressing F1 function key
6238
* \<f12\> - for pressing F1 function key
6240
* \<up\> - for pressing up arrow key
6242
* \<down\> - for pressing down arrow key
6244
* \<right\> - for pressing right arrow key
6246
* \<left\> - for pressing left arrow key
6248
* \<esc\> - for pressing escape key
6250
* \<space\> - for pressing space bar
6252
* \<home\> - for pressing home key
6254
* \<end\> - for pressing end key
6256
* \<pageup\> - for pressing page up key
6258
* \<pagedown\> - for pressing page down key
6260
* \<prtscrn\> - for pressing print screen key
6263
* \author Nagappan Alagappan <nagappan@gmail.com>
6267
/** \page keypress keypress
6270
* keypress ('\<data\>')
6272
* \section Description
6274
* Functionality of keypress is similar to typekey of LTFX project.
6276
* \section ImplementationDetails
6278
* Used SPI_generateKeyboardEvent to generate the keyboard events.
6280
* \retval Returns 1 on success, LdtpExecutionError exception will be thrown on failure
6282
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/device.c
6286
* keypress ('\<shift\>');generatekeyevent ('hELLO');keyrelease ('\<shift\>');generatekeyevent ('\<space\>World')
6288
* This function supports
6290
* \<alt\> - for alt key
6292
* \<ctrl\> - for control key
6294
* \<shift\> - for pressing shift key
6296
* \<enter\> - for pressing enter key
6298
* \<tab\> - for pressing tab key
6300
* \<del\> - for pressing del key
6302
* \<bksp\> - for pressing back space key
6304
* \<f1\> - for pressing F1 function key
6308
* \<f12\> - for pressing F1 function key
6310
* \<up\> - for pressing up arrow key
6312
* \<down\> - for pressing down arrow key
6314
* \<right\> - for pressing right arrow key
6316
* \<left\> - for pressing left arrow key
6318
* \<esc\> - for pressing escape key
6320
* \<space\> - for pressing space bar
6322
* \<home\> - for pressing home key
6324
* \<end\> - for pressing end key
6326
* \<pageup\> - for pressing page up key
6328
* \<pagedown\> - for pressing page down key
6330
* \<prtscrn\> - for pressing print screen key
6333
* \author Nagappan Alagappan <nagappan@gmail.com>
6337
/** \page generatemouseevent generatemouseevent
6340
* generatemouseevent (x, y [,'\<options\>'])
6342
* \section Description
6344
* Functionality of generatemouseevent, generates the default (left
6345
* click) or specified mouse event in the given X and Y
6350
* This functionality depends on screen resolution / coordinates. Also
6351
* the event will be generated on the currently focused window.
6353
* \subsection Options
6355
* b1c - Left button click
6357
* b2c - Middle button click
6359
* b3c - Right button click
6361
* b1d - Left button double click
6363
* b2d - Middle button double click
6365
* b3d - Right button double click
6367
* abs - absolute motion
6369
* rel - relative motion
6371
* \section ImplementationDetails
6373
* Used SPI_generateMouseEvent to generate the mouse events.
6375
* \retval Returns 1 on success, LdtpExecutionError exception will be thrown on failure
6377
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
6381
* generatemouseevent (100, 200)
6384
* generatemouseevent (100, 200, "b1d") # Generate double click event
6386
* \author Nagappan Alagappan <nagappan@gmail.com>
6390
/** \page stopscriptengine stopscriptengine
6393
* stopscriptengine ()
6395
* \section Description
6397
* Stops the LDTP engine, free all the resources. If we want to stop LDTP service, we can use this function to silently die.
6401
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
6405
* from ldtp import *
6407
* stopscriptengine ()
6409
* \author Nagappan Alagappan <nagappan@gmail.com>
6413
/** \page hasstate hasstate
6416
* hasstate ('<window name\>', '<object name\>', <object SPI state-1>[, ..., <object SPI state-n>])
6418
* \section Description
6420
* Checks the SPI state of the given object.
6422
* \retval 1 on success, 0 on failure
6425
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c
6426
* http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtp.py
6430
* With respect to gedit window, first tab
6432
* from ldtp import *
6434
* hasstate ('*-gedit', 'txt0', state.FOCUSABLE)
6436
* hasstate ('*-gedit', 'txt0', state.FOCUSABLE, state.VISIBLE)
6438
* \author Nagappan Alagappan <nagappan@gmail.com>
6442
/** \page press press
6445
* press ('<window name\>', '<object name\>')
6447
* \section Description
6449
* Toggle's the button state.
6451
* \retval 1 on success, 0 on failure
6454
* http://cgit.freedesktop.org/ldtp/ldtp/tree/src/toggle-button.c
6455
* http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtp.py
6461
* \author Rodney Dawes <dobey@novell.com>
6465
/** \page objectexist objectexist
6468
* objectexist ('<window name\>', '<object name\>')
6470
* \section Description
6472
* To check whether a component exist in a given window
6474
* \retval 1 on success, 0 on failure
6476
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtp.py
6482
* \author Rodney Dawes <dobey@novell.com>
6486
/** \page appundertest appundertest
6489
* appundertest ('\<accessibility application name\>')
6491
* \section Description
6493
* First try to find the window under the given application name, if not found then try to find it from the global list.
6495
* \retval 1 on success, 0 on failure
6497
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtp.py
6501
* appundertest ('gedit')
6503
* If two window's having gedit title and only one window belongs to gedit application, even though, its first in the accessibility list, based on the above call, any operation on '*gedit' window operation, the event will be fired on gedit application only.
6504
* http://lists.freedesktop.org/archives/ldtp-dev/2009-February/000764.html
6506
* \author Nagappan Alagappan <nagappan@gmail.com>
6510
/** \page objtimeout objtimeout
6513
* objtimeout ([guiTimeOut])
6515
* \section Description
6517
* Instead of setting an environment variable you can change the object time out from default 5 seconds to what ever time period. guiTimeOut should be > 0.
6519
* \retval 1 on success, 0 on failure
6521
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtp.py
6527
* \author Nagappan Alagappan <nagappan@gmail.com>
6531
/** \page guitimeout guitimeout
6534
* guitimeout ([guiTimeOut])
6536
* \section Description
6538
* Instead of setting an environment variable you can change the object time out from default 30 seconds to what ever time period. guiTimeOut should be > 0.
6540
* \retval 1 on success, 0 on failure
6542
* Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/python/ldtp.py
6548
* \author Nagappan Alagappan <nagappan@gmail.com>