Home

LDTP Reference Manual

image

Contents

1. lt window name gt lt component name gt 3 35 2 Description Uncheck un tick the check state 3 35 3 Implementation Return values I if state is unchecked else 0 Refer http cvs freedesktop org ldtp pyldtp check_box c 3 35 4 Example from Idtp import To uncheck menu item with respect to gedit menu uncheck gedit mnuOutputWindow For check menu item with respect to gedit menu uncheck gedit mnuToolbar To uncheck box with respect to gedit preferences uncheck dlgPreferences cboxEnableAutoIndentation Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 36 click 20 Author Nagappan lt nagappan gmail com gt 3 36 click 3 36 1 Syntax click lt window name gt lt component name gt 3 36 2 Description click on radio button check box push button combo box radio menu item toggle button radio button 3 36 3 Implementation 3 36 3 1 Radio Button If radio button is already in checked state then this function will uncheck unset it If radio button is already in unchecked state then this function will check set it Refer http cvs freedesktop org ldtp pyldtp radio button e 3 36 3 2 Check Box If check box is already in checked state then this function will uncheck unset it If check box is already in unchecked state then this function will check set it Refer http cvs freedesktop org ldtp pyldtp chec
2. mnuFile mnuNew 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 Author prem jothimani gmail com 3 141 startlog 3 141 1 Syntax startlog log file name gt 0 or 1 second arugment is optional and 0 is default value 0 Append log to an existing file 1 Write log to a new file If file already exist then erase existing file content and start log 3 141 2 Description Start logging on the specified file 3 141 3 Implementation 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 Return values 1 on Success and 0 on error Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 142 stoplog 86 3 141 4 Example If we want to overwrite existing log file or create new log file startlog evolution xml 1 If we want to append existing log file or create new log file startlog evolution xml 0 or startlog evolution xml Author Nagappan lt nagappan gmail com gt 3 142 stoplog 3 142 1 Syntax stoplog 3 142 2 Description Stop logging 3 142 3 Implementation If a log file has been previously opened for logging that file pointer will be closed So that the new logging
3. 3 72 3 Implementation Return values 1 on success and throws an exception on error Refer http cvs freedesktop org ldtp pyldtp table c http cvs freedesktop org ldtp pyldtp tree_table c Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 73 verifytogglebutton 44 3 72 4 Example With respect to evolution selectrowpartialmatch evolution ttbIMailFolder Inbox 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 Author Nagashree lt mnagashree novell com gt 3 73 verifytogglebutton 3 73 1 Syntax Todo 3 73 2 Description Todo 3 73 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp toggle butten 3 73 4 Example Todo Author Poornima Nayak lt pnayak novell com gt 3 74 onedown 3 74 1 Syntax onedown window name gt lt scroll component name gt lt number of iterations gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 75 oneleft 45 3 74 2 Description Move the scroll bar down n times where n is the number of iterations specified in the argument field 3 74 3 Implementation Scrolls down if value does not exceed the maximum limit else fails Refer http cvs freedesktop org ldtp pyldtp scroll_bar c 3 74 4 Example from Idtp import For scroll bar item with respect to gedit onedown ge
4. s checkrow doesrowexist getcellvalue getrowcount gettreetablerowindex selectlastrow selectrow selectrowindex selectrowpartialmatch sortcolumn sortcolumnindex uncheckrow verifycellvalue Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 25 Window functions 12 verifypartialcellvalue 3 25 Window functions 3 25 1 About Window functions To operate on an object window in which accessibility is not enabled 3 25 2 Window python API s activatewin activatewinpartialname closeappwindow getactivewin partialexists typekey waitwinname waitwinpartialname windowexists 3 26 initappmap 3 26 1 Syntax initappmap application map name gt 3 26 2 Description Application map will be loaded Refer http cvs freedesktop org ldtp pyldtp ldtp c http cvs freedesktop org ldtp pyldtp appmap c 3 26 3 Example from ldtp import initappmap nautilus map Author Nagappan lt nagappan gmail com gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 27 guiexist 13 3 27 guiexist 3 27 1 Syntax guiexist window name gt 3 27 2 Description If the given window name exist this function returns 1 If window doesnot exist then this function returns 0 Refer http cvs freedesktop org ldtp pyldtp ldtp c 3 27 3 Implementation Return values 1 on success and 0 on no existing window 3 27 4 Example guiexist dlgOpen Author Nagappa
5. 3 114 gettextvalue 69 3 114 gettextvalue 3 1141 Syntax gettextvalue lt window name gt lt component name gt lt startoffset gt lt endoffset gt 3 114 2 Description returns the text within the given range in the component given by the component name lt startoffset gt and lt endoffset gt are optional If they are ommited the entire text is returned 3 114 3 Implementation returns the string Refer http cvs freedesktop org ldtp pyldtp text c 3 114 4 Example With respect to gnome search tool structure gettextvalue SearchforFiles txtNameContainsEntry The above statement will return the text present in txtNameContainsEntry field gettextvalue SearchforFiles txtNameContainsEntry 5 The above statement will return the text present in txtNameContainsEntry field start ing from the fifth character gettextvalue SearchforFiles txtNameContainsEntry 5 10 The above statement will return the text present in txtNameContainsEntry field start ing from the fifth character till the tenth character Author Premkumar J lt prem jothimani gmail com gt 3 115 getcellvalue 3 115 1 Syntax getcellvalue lt window name gt lt component name gt lt row gt lt column gt 3 115 2 Description returns the text in a cell at given row and column of a tree table Generated on Sat Nov 19 14 38 57 2005 for LDTP by Dox
6. 3 48 1 Syntax copytext lt window name gt lt component name gt lt startoffset gt lt endoffset gt 3 48 2 Description Copies text within specified offset present in the specified lt component gt into clipboard 3 48 3 Implementation Return values 1 on success and 0 otherwise Refer http cvs freedesktop org ldtp pyldtp text c 3 48 4 Example With respect to gedit tool structure copytext gedit txt0 5 10 This is to copy the text within the offset specified from the txtO field into clipboard Author Premkumar J lt prem jothimani gmail com gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 49 inserttext 29 349 inserttext 3 49 1 Syntax Insert lt window name gt lt component name gt lt position gt lt text gt 3 49 2 Description Insert the text in the specified position in the component given by the component name 3 49 3 Implementation Return values 1 on success and 0 otherwise Refer http cvs freedesktop org ldtp pyldtp text c 3 49 4 Example With respect to gedit inserttext gedit txt0 5 sample text This is to insert the given text at the specified position in the txtName field Author Premkumar J lt prem jothimani gmail com gt 3 49 5 Syntax inserttext lt window name gt lt component name gt lt position gt lt text gt 3 49 6 Description Insert the text
7. getactivewin 3 151 2 Description Return values The active window title string Refer http cvs freedesktop org ldtp pyldtp ldtputils py 3 151 3 Example title getactivewin print Current active window title title Gets the current active window title window that is currently in focus 3 151 4 Dependency Itfx binary http sourceforge net projects 1tfx Author Nagappan lt nagappan gmail com gt Shankar Ganesh lt shagan glare gmail com gt 3 152 windowexists 3 152 1 Syntax windowexists lt window name gt 3 152 2 Description Check window name exists with the given name Return values 1 if window exist and 0 otherwise Refer http cvs freedesktop org ldtp pyldtp ldtputils py Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 153 partialexists 93 3 152 3 Example windowexists Mozilla Firefox 3 152 4 Dependency Itfx binary http sourceforge net projects 1tfx Author Nagappan lt nagappan gmail com gt Shankar Ganesh lt shagan glare gmail com gt 3 153 partialexists 3 1531 Syntax partialexists window name gt 3 1532 Description Check window name partially matches with the given name Return values 1 if window exist and 0 otherwise Refer http cvs freedesktop org ldtp pyldtp ldtputils py 3 153 3 Example partialexists Firefox 3 153 4 Dependency ltfx binary http sourceforge net projects ltf
8. gettextproperty 71 comparetextproperty 71 containstextproperty 72 selectcalendardate 72 Todo List 97 3 LDTP Page Documentation 3 1 Calendar View 3 1 1 About Calendar View To operate on a calendar view object and based on your requirement you can use any of these functions 3 1 2 Calendar View python API s openevent selectevent selecteventindex verifyeventexist Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 32 Checkbox functions 3 3 2 Checkbox functions 3 2 1 About Checkbox functions To operate on a check box object and based on your requirement you can use any of these functions 3 2 2 Checkbox python API s check click uncheck verifycheck verifyuncheck 3 3 Checkmenuitem functions 3 31 About Checkmenuitem functions To operate on a check menuitem object and based on your requirement you can use any of these functions 3 3 2 Checkmenuitem python API s check click uncheck verifycheck verifyuncheck verifymenucheck 3 4 Combobox functions 341 About Combobox functions To operate on a combobox object and based on your requirement you can use any of these functions 3 4 2 Combobox python API s capturetofile Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 5 General functions 4 click comboselect hidelist selectindex selectpartialmatch settextvalue showlist verifydropdown verifyhidelist verifyselect verifysettext verifyshowlist
9. http cvs freedesktop org ldtp pyldtp table c Refer http cvs freedesktop org ldtp pyldtp tree_table c 3 131 4 Example from Idtp import With respect to Evolution open message verifypartialtablecell frmReadOnlyMail tblcheck 1 1 xyz Author 3 132 verifyclick 3 132 1 Syntax Todo 3 132 2 Description Todo 3 132 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp toggle button 3 132 4 Example Todo Author 3 133 listsubmenus 3 133 1 Syntax Todo Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 134 verifyscrollbar 81 3 1332 Description Todo 3 133 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp menu_item c 3 133 4 Example Todo Author 3 134 verifyscrollbar 3 134 1 Syntax Todo 3 134 2 Description Todo 3 134 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp scroll_bar c 3 134 4 Example Todo Author Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 135 verifyscrollbarhorizontal 82 3 135 verifyscrollbarhorizontal 3 135 1 Syntax Todo 3 135 2 Description Todo 3 135 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp scroll_bar c 3 135 4 Example Todo Author 3 136 verifyscrollbarvertical 3 136 1 Syntax Todo 3 136 2 Description Todo 3 136 3 Implementation Todo Refer
10. lt number of iterations gt 3 85 2 Description Increase the value of the slider n times where n is the number of iterations specified in the argument field 3 85 3 Implementation Increases the value if it does not exceed the maximum limit else fails Refer http cvs freedesktop org ldtp pyldtp slider c 3 85 4 Example from ldtp import For slider component with respect to gnome terminal increase dlgEditingProfile Default slider 3 Author Aishwariya amp Kamakshi lt poorvaishoo yahoo com gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 86 decrease 52 3 86 decrease 3 86 1 Syntax decrease window name gt lt slider name gt lt number of iterations gt 3 86 2 Description Decrease the value of the slider n times where n is the number of iterations specified in the argument field 3 86 3 Implementation Decreases the value if it does not fall below the minimum limit else fails Refer http cvs freedesktop org ldtp pyldtp slider c 3 86 4 Example from Idtp import For slider component with respect to gnome terminal decrease dlgEditingProfile Default slider 3 Author Aishwariya amp Kamakshi lt poorvaishoo yahoo com gt 3 87 selectpanel 3 87 1 Syntax selectpanel window name gt lt component name gt lt panel number 3 87 2 Description Select a panel using the panel number in a list
11. lt window name gt lt scroll component name gt lt number of iterations gt 3 77 2 Description Move the vertical scroll bar up n times where n is the number of iterations speci fied in the argument field 3 77 3 Implementation Scrolls up if value does not drop below the minimum limit else fails Refer http cvs freedesktop org ldtp pyldtp scroll_bar c Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 78 scrolldown 47 3 77 4 Example from ldtp import For scroll bar item with respect to gedit oneup gedit scrollBar 3 Author Aishwariya amp Kamakshi lt poorvaishoo yahoo com gt 3 78 scrolldown 3 78 1 Syntax scrolldown lt window name gt lt scroll component name gt 3 78 2 Description Move the vertical scroll bar to the bottom 3 78 3 Implementation Return values 1 if action is performed else 0 Refer http cvs freedesktop org ldtp pyldtp scroll_bar c 3 78 4 Example from Idtp import For scroll bar item with respect to gedit scrolldown gedit scrollBar Author Aishwariya amp Kamakshi lt poorvaishoo yahoo com gt 3 79 scrollleft 3 79 1 Syntax scrolleft lt window name gt lt scroll component name gt 3 79 2 Description Move the horizontal scroll bar to the extreme left Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 80 scrollright 48 3 79 3 Impleme
12. 129 2 Description Todo 3 129 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp table c 3 129 4 Example Todo Author Premkumar J lt prem jothimani gmail com gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 130 verifycellvalue 79 3 130 verifycellvalue 3 130 1 Syntax verifytablecell window name gt lt table name gt lt row no gt lt column no gt lt string to be compared gt 3 130 2 Description Verifies the tablecell value with the String Passed ie fifth argument 3 130 3 Implementation Return values Returns 1 on success and O on error Refer http cvs freedesktop org ldtp pyldtp table c Refer http cvs freedesktop org ldtp pyldtp tree_table c 3 130 4 Example from ldtp import With respect to Evolution open message verifytablecell CfrmReadOnlyMail tblcheck 1 1 xyz yahoo com Author Bhargavi lt kbhargavi_83 yahoo co in gt 3 131 verifypartialcellvalue 3 131 1 Syntax verifypartialtablecell lt lt window name gt lt table name gt lt row no gt lt column no gt lt sub string to be compared gt 3 131 2 Description Verifies the tablecell value with the sub String Passed ie fifth argument 3 131 3 Implementation Return values Returns 1 on success and 0 on error Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 132 verifyclick 80 Refer
13. 3 5 General functions 3 5 1 About General functions General Idtp functions Based on your requirement you can use any of these functions 3 5 2 General python API s guiexist getobjectinfo getobjectlist getobjectproperty getwindowlist initappmap launchapp processrunning reinitldtp releasecontext remap setcontext wait waittillguiexist waittillguinotexist Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 6 Imaging functions 5 3 6 Imaging functions 3 6 1 About Imaging functions To manipulate with image processing and based on your reguirement you can use any of these functions 3 6 2 Imaging python API s blackoutregion imagecapture imagecompare 3 7 Label functions 3 7 1 About Label functions To operate on a label object and based on your requirement you can use any of these functions 3 7 2 Label python API s getlabel 3 8 Layeredpane functions 3 8 1 About Layeredpane functions To operate on a layered pane object and based on your requirement you can use any of these functions 3 8 2 Layeredpane python API s rightclick selectitem 3 9 Logging functions 3 9 1 About Logging functions Log functions are used to log the operations performed Output format of log file is XML file Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 10 Menuitem functions 6 3 9 2 Logging python API s log startlog stoplog 3 10 Menuitem functions 3 10 1 About Menui
14. 3 Implementation Return values 1 on success and 0 otherwise Refer http cvs freedesktop org ldtp pyldtp text c 3 51 4 Example With respect to gedit tool structure deletetext gedit txtName 1 3 This is to delete the text from the startindex to endindex specified in the txtName field Author Kamakshi lt poorvakrishna yahoo com gt 3 52 showlist 3 52 1 Syntax showlist lt dlgName gt lt cmbName gt 3 52 2 Description Displays combo box drop down list in the current dialog 3 52 3 Implementation 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 Refer http cvs freedesktop org ldtp pyldtp combo_box c 3 52 4 Example Todo Author Poornima lt pnayak novell com gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 53 verifydropdown 32 3 53 verifydropdown 3 53 1 Syntax Todo 3 53 2 Description Todo 3 53 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp combo_box c 3 53 4 Example Todo Author Poornima lt pnayak novell com gt 3 54 verifyhidelist 3 54 1 Syntax verfyhidelist lt dlgName gt lt cmbName gt 3 54 2 Description Verifies if combo box drop down list in the current dialog is not
15. Author Nagappan lt nagappan gmail com gt Aishwariya lt aishwariyabhavan yahoo com gt Khasim Shaheed lt khasim shaheed gmail com gt 3 38 verifyuncheck 3 38 1 Syntax verifyuncheck lt window name gt lt component name gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 39 verifymenucheck 22 3 38 2 Description Checks the state of check box 3 38 3 Implementation If check box state is un checked then returns 1 else 0 Refer http cvs freedesktop org ldtp pyldtp check_box c 3 38 4 Examples from ldtp import To verify uncheck menu item with respect to gedit menu verifyuncheck gedit mnuView mnOutputWindow To verify uncheck box with respect to gedit preferences verifyuncheck dlgPreferences cboxEnableAutoIndentation Author Nagappan lt nagappan gmail com gt Khasim Shaheed lt khasim shaheed gmail com gt 3 39 verifymenucheck 3 39 1 Syntax Todo 3 39 2 Description Todo 3 39 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp check_menu_ item c Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 40 hidelist 23 3 39 4 Example Todo Author Nagappan lt nagappan gmail com gt 3 40 hidelist 3 40 1 Syntax hidelist lt lt dlgName gt lt cmbName gt 3 40 2 Description Hides combo box drop down list in the current dialog Suppose in previous operation one testcase has clic
16. c 3 43 4 Example With respect to gnome search tool structure settextvalue SearchforFiles txtNameContainsEntry abcd This is to insert the text abcd into the txtNameContainsEntry field In combo box Todo settextvalue lt dlgName gt lt cmbName gt lt argument gt Author Poornima lt pnayak novell com gt 3 44 appendtext 3 44 1 Syntax appendtext lt window name gt lt component name gt lt text gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 45 activatetext 26 3 44 2 Description Appends the given text with already present text 3 44 3 Implementation Return values 1 on success and 0 otherwise Refer http cvs freedesktop org ldtp pyldtp text c 3 44 4 Example With respect to gedit structure appendtext gedit txtmain Sample text This to append Sample text to the main text box contents in gedit Author Shagan lt shagan glare gmail com gt 345 activatetext 3 45 1 Syntax activatetext lt window name gt lt component name gt 3 45 2 Description activates the text box similar to press enter after setting text 3 45 3 Implementation Return values 1 on success and 0 otherwise Refer http cvs freedesktop org ldtp pyldtp text c 3 45 4 Example With respect to gftp gtk structure activatetext gFTP txtUser This is to activate the text b
17. end of testcases 3 30 2 Description Logs the message in the log xml with the tag which can be viewed after the execution of scripts 3 30 3 Implementation The required message will be logged into the log xml on execution of scripts Return values 1 on success and 0 on error Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 31 reinitldtp 16 3 30 4 Example With Respect to Evolution 1 log EvolutionSuite begin execfile evolution py log EvolutionSuite end 2 With respect to Appointment to check the checkbox In Try Block selecttab dlgAppointment NoSummary ptlAppointment Nosummary 1 log Selecttab In Appointment pass In except block print Error log Selecttab fail 3 With respect to creation of vFolders log Creation of vFolders teststart Create_folder log Creation of vFolders testend 4 Log message showing success of some test case from Idtp import You can log the message to start the test case before writing the test case as log Open a file teststart log opening a file pass Author Nagashree lt mnagashree novell com gt 3 31 reinitldtp 3 31 1 Syntax Todo 3 31 2 Description Todo Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 32 regwincallback 17 3 31 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp ldt
18. getobjectinfo Page getobjectinfo Page getobjectinfo Page getobjectproperty Page getobjectproperty Page getobjectproperty Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 159 Todo List 105 Page getobjectproperty Page selectpartialmatch Page selectpartialmatch Page selectpartialmatch Page selectpartialmatch Page doubleclickrow Page activatetablerow Page activatetablerow Page activatetablerow Page activatetablerow Page settablecelldata Page settablecelldata Page settablecelldata Page settablecelldata Page verifyclick Page verifyclick Page verifyclick Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 159 Todo List 106 Page verifyclick Page listsubmenus Page listsubmenus Page listsubmenus Page listsubmenus Page verifyscrollbar Page verifyscrollbar Page verifyscrollbar Page verifyscrollbar Page verifyscrollbarhorizontal Page verifyscrollbarhorizontal Page verifyscrollbarhorizontal Page verifyscrollbarhorizontal Page verifyscrollbarvertical Page verifyscrollbarvertical Page verifyscrollbarvertical Page verifyscrollbarvertical Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 159 Todo List 107 Page verifyslider Page verifyslider Page verifyslider Page verifyslider Page verifysliderhorizontal Page verifysliderhorizontal Page verifysliderhorizontal Page verifysliderhorizontal P
19. http cvs freedesktop org ldtp pyldtp scroll_bar c Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 137 verifyslider 83 3 136 4 Example Todo Author 3 137 verifyslider 3 137 1 Syntax Todo 3 137 2 Description Todo 3 137 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp slider c 3 137 4 Example Todo Author 3 138 verifysliderhorizontal 3 138 1 Syntax Todo 3 138 2 Description Todo Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 139 verifyslidervertical 84 3 138 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp slider c 3 138 4 Example Todo Author 3 139 verifyslidervertical 3 139 1 Syntax Todo 3 139 2 Description Todo 3 139 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp slider c 3 139 4 Example Todo Author 3 140 doesmenuitemexist 3 140 1 Syntax doesmenuitemexist lt window name gt lt menu hierarchy gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 141 startlog 85 3 140 2 Description checks if the specified menuitem specified in the menu hierarchy is present or not 3 140 3 Implementation Return values Returns if the menuitem is present and 0 otherwise Refer http cvs freedesktop org ldtp pyldtp menu_item c 3 140 4 Example With respect to gedit menu structure doesselectmenuitem gedit
20. of a text box the cursor is placed in it 3 104 3 Implementation Return values returns 1 on success and 0 otherwise 3 104 4 Example With respect to gnome search tool structure settextvalue SearchforFiles txtNameContainsEntry This places the cursor in the txtNameContainsEntry field 3 105 selectpanelname 3 105 1 Syntax selectpanelname lt window name gt lt component name gt lt panel name gt 3 105 2 Description Select a panel using the panel name in a list of panels 3 105 3 Implementation Return values Returns 1 on success and 0 on error Refer http cvs freedesktop org ldtp pyldtp panel c Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 106 verifyeventexist 64 3 105 4 Example from ldtp import With respect to Contacts selectpanelname Evolution Contacts pnlAddbook ldtp Author Khasim Shaheed lt khasim shaheed gmail com gt 3 106 verifyeventexist 3 106 1 Syntax verifyeventexist window name gt lt component name gt 3 106 2 Description verifies whether any events are present in a calendar table 3 106 3 Implementation Return values Returns 1 on success and 0 on no events Refer http cvs freedesktop org ldtp pyldtp calendar_ view c 3 106 4 Example from Idtp import With respect to Evolution Calendars verifyeventexist Evolution Calendars calview Author Manu lt manunature
21. of panels 3 87 3 Implementation Return values 1 on success and 0 on error Refer http cvs freedesktop org ldtp pyldtp panel c Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 88 verifytablecell 53 3 87 4 Example from ldtp import With respect to Contacts selectpanel Evolution Contacts pnlAddbook 1 Author Poornima Nayak lt pnayak novell com gt 3 88 verifytablecell 3 88 1 Syntax verifytablecell lt window name gt lt table name gt lt row no gt lt column no gt lt string to be compared gt 3 88 2 Description Verifies the tablecell value with the String Passed ie fifth argument 3 88 3 Implementation Return values 1 on success and 0 on error Refer http cvs freedesktop org l1dtp pyldtp table c 3 88 4 Example from Idtp import With respect to Evolution open message verifytablecell CfrmReadOnlyMail tblcheck 1 1 xyz yahoo com Author Bhargavi lt kbhargavi_83 yahoo co in gt 3 89 settablecell 3 89 1 Syntax Todo Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 90 selectlastrow 54 3 89 2 Description Todo 3 89 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp table c 3 89 4 Example Todo Author Nagappan A lt nagappan gmail com gt 3 90 selectlastrow 3 90 1 Syntax selectlastrow lt window name gt lt table name gt 3 90
22. org ldtp pyldtp ldtp c Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 93 selectevent 56 3 92 4 Example 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 releasecontext Author Nagappan A lt nagappan gmail com gt 3 93 selectevent 3 93 1 Syntax selectevent lt window name gt lt Calendar_view name gt lt calendar event summary gt 3 93 2 Description Selects the row from the table of calendar events based on the calendar event name specified 3 93 3 Implementation Return values Returns 1 on success and 0 on error Refer http cvs freedesktop org ldtp pyldtp calendar_ view c 3 93 4 Example In Evolution Calendars for selecting an appointment calendar event present in the table from ldtp import selectevent Evolution Calendars calview abc Author Poornima lt pnayak novell com gt 3 94 selecteventindex 3 94 1 Syntax selecteventindex lt window name gt lt component name gt lt event number gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 95 openevent 57 3 94 2 Description Select an event from a calendar table using its index Index for a calendar event starts from 1 3 94 3 Implementation Return v
23. rediffmail com gt 3 107 expandtablecell 3 107 1 Syntax Todo Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 108 gettreetablerowindex 65 3 1072 Description Todo 3 107 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp tree_table c 3 107 4 Example Todo Author 3 108 gettreetablerowindex 3 108 1 Syntax gettreetablerowindex lt window name gt lt tree table name gt lt name of a table cell gt 3 108 2 Description Used to obtain the index of any table cell whose whose name is give in the last field 3 108 3 Implementation Return values Returns the index of the specified table cell if it is present in the tree table men tion Otherwise returns 1 Refer http cvs freedesktop org ldtp pyldtp tree_table c 3 108 4 Example from Idtp import With respect to the tree table in Mail in Evolution i gettreetablerowindex Evolution treetb Mail Cabinet Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 109 gettablerowindex 66 here i will be having the index of the Cabinet which is a table cell under tree table mail Author Aginesh lt sraginesh novell com gt 3 109 gettablerowindex 3 109 1 Syntax gettablerowindex C lt window name gt lt component name gt lt tablename gt lt cellvalue gt 3 109 2 Description Returns the id of the row containing the given lt cellvalu
24. selecttab 38 Author Nagappan A lt nagappan gmail com gt Thanikachalam S lt thanikal999 yahoo com gt 3 63 selecttab 3 63 1 Syntax selecttab lt windwo name gt lt tab list name gt lt tab name gt 3 63 2 Description Select the given tab name in the tab list 3 63 3 Implementation Return values 1 if the tab is selected Exceptions otherwise ldtp error will be thrown Refer http cvs freedesktop org ldtp pyldtp page tab Tistg 3 63 4 Example from ldtp import For selecting Editor tab with respect to gedit preferences selecttab dlgPreferences ptlPreferences Editor Author Thanikachalam S lt thanikal999 yahoo com gt 3 64 selecttabindex 3 64 1 Syntax selecttabindex windwo name gt lt tab list name gt lt index of the tab gt 3 64 2 Description Select a particular tab in the list of tabs Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 65 verifypushbutton 39 3 64 3 Implementation Return values 1 if the tab is selected Exceptions otherwise ldtp error will be thrown Refer http cvs freedesktop org ldtp pyldtp page tab ditsEA 3 64 4 Example from ldtp import For selecting Editor tab with respect to gedit preferences selecttabindex dlgPreferences ptlPreferences 1 Note 0 based index Author Nagappan A lt nagappan gmail com gt 3 65 verifypushbutton 3 65 1 Syntax verifypushb
25. visible 3 54 3 Implementation 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 Refer http cvs freedesktop org ldtp pyldtp combo_box c Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 55 verifyshowlist 33 3 54 4 Example Todo Author Poornima lt pnayak novell com gt 3 55 verifyshowlist 3 55 1 Syntax verifyshowlist lt dlgName gt lt cmbName gt 3 55 2 Description Verifies if combo box drop down list in the current dialog is visible 3 55 3 Implementation 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 Refer http cvs freedesktop org ldtp pyldtp combo_box c 3 55 4 Example Todo Author Poornima lt pnayak novell com gt 3 56 verifyselect 3 56 1 Syntax verifyselect lt dlgName gt lt cmbName gt lt argument gt 3 56 2 Description VerfySelect action will verify if combo box is set to value given in argument Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 57 verifysettext 34 3 56 3 Implementation VerifySelect function will try to find if text box associated w
26. 05 for LDTP by Doxygen 3 103 verifypartialtablecell 62 3 102 2 Description Returns the number of rows present in the table mentioned 3 102 3 Implementation Returns the number of rows present in the table mentioned Refer http cvs freedesktop org ldtp pyldtp table c Refer http cvs freedesktop org ldtp pyldtp tree_table c 3 102 4 Example from ldtp import With respect to Evolution to check no of mails getrowcount frmReadOnlyMail tblmails Author Bhargavi lt kbhargavi_83 yahoo co in gt 3 103 verifypartialtablecell 3 103 1 Syntax verifypartialtablecell lt window name gt lt table name gt lt row no gt lt column no gt lt sub string to be compared gt 3 103 2 Description Verifies the tablecell value with the sub String Passed ie fifth argument 3 103 3 Implementation Return values Returns 1 on success and 0 on error Refer http cvs freedesktop org ldtp pyldtp table c 3 103 4 Example from Idtp import With respect to Evolution open message verifypartialtablecell frmReadOnlyMail tblcheck 1 1 xyz Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 104 grabfocus 63 Author Bhargavi lt kbhargavi_83 yahoo co in gt 3 104 grabfocus 3 104 1 Syntax grabfocus lt window name gt lt component name gt 3 104 2 Description gives focus to the specified component in case
27. 2 Description Selects the last row of a table 3 90 3 Implementation Returns 1 on success and 0 on error Refer http cvs freedesktop org ldtp pyldtp table c 3 90 4 Example from Idtp import With respect to Contact List Members dialog of Contact List Editor selectlastrow dlgContactListMembers tblContacts Author Nagappan lt nagappan gmail com gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 91 setcontext 55 3 91 setcontext 3 91 1 Syntax setcontext lt previous title name gt lt new title name gt 3 91 2 Description LDTP selects window frame dialog alert font chooser based on the title name 3 91 3 Implementation set the context to new title name Changes are done in is_matching function in gui c Refer http cvs freedesktop org ldtp pyldtp ldtp c 3 91 4 Example 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 setcontext Mozilla Firefox NOVELL Novell and Linux Mozilla Firefox Author Nagappan A lt nagappan gmail com gt 3 92 releasecontext 3 92 1 Syntax releasecontext 3 92 2 Description Release the last context set 3 92 3 Implementation Release the existing last context set using setcontext function Refer http cvs freedesktop
28. 25 getobjectproperty 76 3 125 getobjectproperty 3 125 1 Syntax Todo 3 125 2 Description Todo 3 125 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp ldtp c 3 125 4 Example Todo Author 3 126 selectpartialmatch 3 126 1 Syntax Todo 3 126 2 Description Todo 3 126 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp combo_box c Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 127 doubleclickrow 77 3 126 4 Example Todo Author 3 127 doubleclickrow 3 127 1 Syntax doubleclickrow lt window name gt lt table name gt lt value of row in first column gt 3 127 2 Description Double clicks the row in table whose first column s Oth column value is same as the contents of the third argument in the function call 3 127 3 Implementation Returns 1 on success and 0 on error Refer http cvs freedesktop org ldtp pyldtp tree_table c 3 127 4 Example Todo Author Premkumar J lt prem jothimani gmail com gt 3 128 activatetablerow 3 128 1 Syntax Todo 3 128 2 Description Todo Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 129 settablecelldata 78 3 128 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp table c 3 128 4 Example Todo Author Premkumar J lt prem jothimani gmail com gt 3 129 settablecelldata 3 129 1 Syntax Todo 3
29. 3 Implementation Todo Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 60 selectitem 36 Refer http cvs freedesktop org l1dtp pyldtp label c 3 59 4 Example Todo Author Thanikachalam lt thanikal999 yahoo com gt 3 60 selectitem 3 60 1 Syntax Todo 3 60 2 Description Todo 3 60 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp layered pane c 3 60 4 Example Todo Author Thanikachalam lt thanikal999 yahoo com gt 3 61 selecttextitem 3 61 1 Syntax Todo Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 62 selectmenuitem 37 3 61 2 Description Todo 3 61 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp combo_box c http cvs freedesktop org ldtp pyldtp list c 3 61 4 Example Todo Author Poornima Nayak lt pnayak novell com gt 3 62 selectmenuitem 3 62 1 Syntax selectmenuitem lt window name gt lt menu hierarchy gt 3 62 2 Description Selects the menu item specified 3 62 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp menu c http cvs freedesktop org ldtp pyldtp check menu item c http cvs freedesktop org ldtp pyldtp menu_item c http cvs freedesktop org ldtp pyldtp radio menu item c 3 62 4 Example With respect to gedit menu structure selectmenuitem gedit mnuFile mnuNew Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 63
30. 46 4 Example 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 xstats pstats evolution 2 xstats start lt Test Script gt xstats stop 3 146 5 Dependency 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 Author Subodh Soni lt subodhsoni gmail com gt 3 147 closeappwindow 3 147 1 Syntax closeappwindow lt Window title name gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 148 wait 90 3 147 2 Description Close application window based on Window title Returns 1 if success and 0 if unable to close the specified application window Refer http cvs freedesktop org ldtp pyldtp ldtputils py 3 147 3 Example closeappwindow Bug Buddy Note Window title name should be case sensitive Author Nagappan lt nagappan gmail com gt Shankar Ganesh lt shagan glare gmail com gt 3 148 wait 3 148 1 Syntax wait lt number of seconds to suspend current execution gt 3 148 2 Description Suspend execution for the specified time period Note Time in seconds Refer http cvs freedesktop org ldtp pyldtp ldtputils py 3 148 3 Example To suspend the current sequence of execution for 5
31. LDTP Reference Manual Generated by Doxygen 1 4 4 Sat Nov 19 14 38 57 2005 CONTENTS 1 Contents 1 LDTP User manual 1 2 LDTP Page Index 1 3 LDTP Page Documentation 2 1 LDTP User manual 1 1 About LDTP Linux Desktop Testing Project LDTP is aimed at producing high quality test au tomation framework and cutting edge tools that can be used to test Linux Desktop and improve it It uses the Accessibility libraries to poke through the application s user interface The framework has tools to generate Appmap by reading through the user interface components of an application The framework also has tools to record test cases based on user selection on the application 1 2 Components list Check Check Com General Imaging Label Calendar box menu bobox View item Layered Logging Menu Panel Process Pushbut Ra pane item Statistics ton diobut ton Ra Scrollbar Slider Spinbut Tabcon Table Text diome ton trol nuitem Toggle Toolbar Window button Treetable 2 LDTP Page Index 2 1 LDTP Related Pages Here is a list of all related documentation pages regwincallback 17 unregwincallback 18 selecttextitem 36 Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 LDTP Page Documentation 2 verifytogglebutton 44 getslidervalue 50 verifytablecell 53 settablecell 53 verifypartialtablecell 62 expandtablecell 64 comboselectindex 66 geteventcount 68
32. Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 99 sortcolumn 60 With respect to Categories in Appointment in Evolution uncheckrow dlgCategories tblcategories 3 Author Bhargavi lt kbhargavi_83 yahoo co in gt 3 99 sortcolumn 3 99 1 Syntax Todo 3 99 2 Description Todo 3 99 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp tree_table c 3 99 4 Example Todo Author 3 100 sortcolumnindex 3 100 1 Syntax Todo 3 100 2 Description Todo Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 101 verifypartialmatch 61 3 100 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp tree table c 3 100 4 Example Todo Author 3 101 verifypartialmatch 3 101 1 Syntax verifypartialmatch lt window name gt lt textbox name gt lt substring gt 3 101 2 Description Verifies the textbox with the partial string 3 101 3 Implementation Return values Returns 1 on success and 0 on error Refer http cvs freedesktop org ldtp pyldtp text c 3 101 4 Example from Idtp import With respect to Evolution to verify textbox with partial string verifypartialmatch frmComposeamessage txtto nove Author Bhargavi lt kbhargavi_83yahoo co in gt 3 102 getrowcount 3 102 1 Syntax getrowcount lt window name gt lt table name gt Generated on Sat Nov 19 14 38 57 20
33. age verifyslidervertical Page verifyslidervertical Page verifyslidervertical Page verifyslidervertical Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen
34. alues Returns 1 on success and 0 on error Refer http cvs freedesktop org ldtp pyldtp calendar view c 3 94 4 Example from Idtp import With respect to Evolution Calendars selecteventindex Evolution Calendars calview 1 Author Poornima lt pnayak novell com gt 3 95 openevent 3 95 1 Syntax Todo 3 95 2 Description Todo 3 95 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp calendar_ view c Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 96 doesrowexist 58 3 95 4 Example Todo Author Poornima lt pnayak novell com gt 3 96 doesrowexist 3 96 1 Syntax doesrowexist lt window name gt lt table name gt lt string to be matched gt no of matches 3 96 2 Description Checks whether the table contains any row with any of its cell containing the given string as its value Please note that it checks for an exact match 3 96 3 Implementation Return values Returns if there are rows with the given string in any of its cell else 0 Refer http cvs freedesktop org ldtp pyldtp table c 3 96 4 Example from ldtp import 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 doesrowexist dlgContactListMembers tblContacts Sample subje
35. ct Author Manu lt manunature rediffmail com gt 3 97 checkrow 3 97 1 Syntax checkrow lt window name gt lt table name gt lt row index gt lt col index gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 98 uncheckrow 59 3 97 2 Description 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 3 97 3 Implementation Return values Returns 1 on success and 0 on error Refer http cvs freedesktop org ldtp pyldtp tree_table c 3 97 4 Example from Idtp import With respect to Categories in Appointment in Evolution checkrow dlgCategories tblcategories 3 Author Bhargavi lt kbhargavi_83 yahoo co in gt 3 98 uncheckrow 3 98 1 Syntax uncheckrow lt window name gt lt table name gt lt row index gt lt col index gt 3 98 2 Description 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 3 98 3 Implementation Return values Returns 1 on success and 0 on error Refer http cvs freedesktop org ldtp pyldtp tree_table c 3 98 4 Example from ldtp import Generated on
36. desktop org ldtp pyldtp ldtp c 3 29 3 Implementation returns 1 on success and 0 on no existing window 3 29 4 Example waittillguinotexist dlgOpen 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 Author Nagappan lt nagappan gmail com gt 3 30 log 3 30 1 Syntax log lt Message to be logged gt lt tag gt where tag can be any of these Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 30 log 15 3 30 1 1 debug messages can be logged while executing in debug mode 3 30 1 2 warning warning message can be logged 3 30 1 3 teststart tag used to indicate the beginning of the test suite 3 30 1 4 testend tag used to indicate the end of the test suite 3 30 1 5 begin tag used to indicate the beginning of test case 3 30 1 6 end tag used at the end of the test case 3 30 1 7 error error messages can be logged with this message 3 30 1 8 pass message will be logged on successful execution of the testcases 3 30 1 9 fail message will be logged on if execution of testcases fail Note Messges for the Tags teststart and testend should not contain spaces in between begin and end These keywords are to be used with the same logging message and at beginning and end of testscripts teststart and testend These keywords are to be used with the same logging message and at the beginning and
37. dit scrollBar 3 Author Aishwariya amp Kamakshi lt poorvaishoo yahoo com gt 3 75 oneleft 3 75 1 Syntax oneleft swindow name gt lt scroll component name gt lt number of iterations gt 3 75 2 Description Move the horizontal scroll bar left n times where n is the number of iterations specified in the argument field 3 75 3 Implementation Scrolls left if value does not drop below the minimum limit else fails Refer http cvs freedesktop org ldtp pyldtp scroll_bar c 3 75 4 Example from ldtp import For scroll bar item with respect to gedit oneleft gedit scrollBar 3 Author Aishwariya amp Kamakshi lt poorvaishoo yahoo com gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 76 oneright 46 3 76 oneright 3 76 1 Syntax oneright lt window name gt lt scroll component name gt lt number of iterations gt 3 76 2 Description Move the horizontal scroll bar right n times where n is the number of iterations specified in the argument field 3 76 3 Implementation Scrolls right if value does not exceed the maximum limit else fails Refer http cvs freedesktop org ldtp pyldtp scroll_bar c 3 76 4 Example from Idtp import For scroll bar item with respect to gedit oneright gedit scrollBar 3 Author Aishwariya amp Kamakshi lt poorvaishoo yahoo com gt 3 77 oneup 3 77 1 Syntax oneup
38. e gt 3 109 3 Implementation Return values Return id of the row containing the given cell value if it is found else return 1 Refer http cvs freedesktop org ldtp pyldtp table c 3 109 4 Example In case of Evolution Calendar to select the category form the list of categories gettablerowindex dlgMeeting dlgCategories tblCategoryList Business The above call would return the row id of the cell containing Business Author Premkumar J lt prem jothimani gmail com gt 3 110 comboselectindex 3 110 1 Syntax Todo 3 110 2 Description Todo Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 111 verifyvisiblebuttoncount 67 3 110 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp combo_box c 3 110 4 Example Todo Author 3 111 verifyvisiblebuttoncount 3 11 1 Syntax Todo 3 111 2 Description Todo 3 111 3 Implementation Todo 3 111 4 Example Todo Author 3 112 verifybuttoncount 3 112 1 Syntax Todo Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 113 geteventcount 68 3 112 2 Todo 3 112 3 Todo 3 112 4 Todo Author 3 113 3 113 1 Todo 3 113 2 Todo 3 113 3 Todo 3 113 4 Todo Author Description Implementation Example geteventcount Syntax Description Implementation Example Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen
39. in the specified position in the component given by the component name 3 49 7 Implementation Return values returns 1 on success and 0 otherwise Refer http cvs freedesktop org ldtp pyldtp text c Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 50 pastetext 30 3 49 8 Example With respect to gedit inserttext gedit txt0 5 sample text This is to insert the given text at the specified position in the txtName field Author Premkumar J lt prem jothimani gmail com gt 3 50 pastetext 3 50 1 Syntax pastetext window name gt lt component name gt lt position gt 3 50 2 Description paste the text from the position specified in the component given by the component name 3 50 3 Implementation Return values 1 on success and 0 otherwise Refer http cvs freedesktop org ldtp pyldtp text c 3 50 4 Example With respect to gedit tool structure pastetext gedit txtName 1 This is to paste the text from the position specified in the txtName field Author Kamakshi lt poorvakrishna yahoo com gt 3 51 deletetext 3 51 1 Syntax deletetext window name gt lt component name gt lt startindex gt lt endindex gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 52 showlist 31 3 51 2 Description delete the text from the startindex till the endindex in the component given by the component name 3 51
40. ion will select an item from combo box where value of index is pointing to its position in list menu 3 42 3 Implementation Combo box will generally have a list as its child or a menu as its child SelectIndex function will try to find whether child type is menu or list if child type is list then there will be a text box associated with combo box When child type is list selects item at index value from list box and sets that value to the text box associated with combo box If child type is menu value specified in tha argument will be index of menu item corressponding menu item will be selected Refer http cvs freedesktop org ldtp pyldtp combo_box c 3 42 4 Example Todo Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 43 settextvalue 25 Author Poornima lt pnayak novell com gt 3 43 settextvalue 3 43 1 Syntax settextvalue lt window name gt lt component name gt lt text gt 3 43 2 Description puts the text into the component given by the component name 3 43 3 Implementation In text c Return values 1 on success and 0 otherwise In combo box c 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 Refer http cvs freedesktop org ldtp pyldtp text c http cvs freedesktop org ldtp pyldtp combo_box
41. ith combo box is set to value specified in the argument Refer http cvs freedesktop org ldtp pyldtp combo_box c 3 56 4 Example Todo Author Poornima lt pnayak novell com gt 3 57 verifysettext 3 57 1 Syntax verifysettext window name gt lt component name gt lt text gt 3 57 2 Description checks if the text is inserted into the component given by the component name 3 57 3 Implementation Return values 1 if the text is inserted into the specified component else returns 0 Refer http cvs freedesktop org ldtp pyldtp combo_box c 3 57 4 Example With respect to gnome search tool structure verifysettext SearchforFiles txtNameContainsEntry abcd This is to verify if the previous settextvalue function has inserted abcd into the txt NameContainsEntry field in the gnome search tool Author Poornima lt pnayak novell com gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 58 rightclick 35 3 58 rightclick 3 58 1 Syntax Todo 3 58 2 Description Todo 3 58 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp tree_table c http cvs freedesktop org ldtp pyldtp layered_pane c 3 58 4 Example Todo Author Thanikachalam S lt thanikal999 yahoo com gt Poornima lt pnayak novell com gt Premkumar J lt prem jothimani gmail com gt 3 59 getlabel 3 59 1 Syntax Todo 3 59 2 Description Todo 3 59
42. k_box c 3 36 3 3 Push Button If push button state is enabled then click on the object Refer http cvs freedesktop org ldtp pyldtp push_button c 3 36 3 4 Toggle Button Click on the toggle button Refer http cvs freedesktop org ldtp pyldtp toggle bubton c 3 36 3 5 Combo Box Clicks on combo box drop down list of combo box will be visible if not already else drop down list of combo box closes Refer http cvs freedesktop org ldtp pyldtp combo_box c 3 36 4 Examples Example for push button With respect to gedit open dialog Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 37 verifycheck 21 click dlgOpen btnOpen For Check box Check menu item on doing this action the state will be toggled For Radio button Radio menu item if they are not already selected they are selected otherwise silently ignored Author Nagappan lt nagappan gmail com gt 3 37 verifycheck 3 37 1 Syntax verifycheck window name gt lt component name gt 3 37 2 Description Checks the state of check box 3 37 3 Implementation If check box state is checked then returns 1 else 0 Refer http cvs freedesktop org ldtp pyldtp check_box c 3 37 4 Examples from Idtp import For check menu item with respect to gedit menu verifycheck gedit mnuView mnOutputWindow For check box with respect to gedit preferences verifycheck digPreferences cboxEnableAutoIndentation
43. ked 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 3 40 3 Implementation 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 Refer http cvs freedesktop org ldtp pyldtp combo_box c 3 40 4 Example Todo Author Poornima lt pnayak novell com gt 341 comboselect 3 41 1 Syntax comboselect lt window name gt lt component name gt lt menu item name gt 3 41 2 Description Select a menu item or list item in a combo box Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 42 selectindex 24 3 41 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp combo_box c 3 41 4 Example In gnome search tool combo box Available options to select the menu item Contains the text comboselect SearchForFiles cmbAvailableoptions Contains the text or comboselect SearchForFiles cmbAvailableoptions Containsthetext Author Poornima lt pnayak novell com gt 3 42 selectindex 3 42 1 Syntax selectindex lt dlgName gt lt cmbName gt lt index gt 3 42 2 Description SelectIndex act
44. ll Page expandtablecell Page expandtablecell Page expandtablecell Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 159 Todo List 102 Page comboselectindex Page comboselectindex Page comboselectindex Page comboselectindex Page verifyvisiblebuttoncount Page verifyvisiblebuttoncount Page verifyvisiblebuttoncount Page verifyvisiblebuttoncount Page verifybuttoncount Page verifybuttoncount Page verifybuttoncount Page verifybuttoncount Page geteventcount Page geteventcount Page geteventcount Page geteventcount Page capturetofile Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 159 Todo List 103 Page capturetofile Page capturetofile Page capturetofile Page gettextproperty Page gettextproperty Page gettextproperty Page gettextproperty Page comparetextproperty Page comparetextproperty Page comparetextproperty Page comparetextproperty Page containstextproperty Page containstextproperty Page containstextproperty Page containstextproperty Page selectcalendardate Page selectcalendardate Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 159 Todo List 104 Page selectcalendardate Page selectcalendardate Page getwindowlist Page getwindowlist Page getwindowlist Page getwindowlist Page getobjectlist Page getobjectlist Page getobjectlist Page getobjectlist Page getobjectinfo Page
45. map module uses to generate appmap Please refer to the following link for the source code of the remap functionality Refer http cvs freedesktop org ldtp pyldtp remap c 3 121 4 Example For handling widgets created at runtime in the New Appointment creation dialog in Evolution Calendar we can use the remap function as mentioned below Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 122 getwindowlist 74 remap evolution dlgAppointment Nosummary undoremap evolution dlgAppointment Nosummary Author Premkumar J lt prem jothimani gmail com gt 3 122 getwindowlist 3 122 1 Syntax Todo 3 122 2 Description Todo 3 122 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp ldtp c 3 122 4 Example Todo Author Premkumar J lt prem jothimani gmail com gt 3 123 getobjectlist 3 123 1 Syntax Todo 3 123 2 Description Todo Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 124 getobjectinfo 75 3 123 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp ldtp c 3 123 4 Example Todo Author Premkumar J lt prem jothimani gmail com gt 3 124 getobjectinfo 3 124 1 Syntax Todo 3 124 2 Description Todo 3 124 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp ldtp c 3 124 4 Example Todo Author Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 1
46. n lt nagappan gmail com gt 3 28 waittillguiexist 3 28 1 Syntax waittillguiexist lt lt window name gt 3 28 2 Description If the given window name exist this function returns 1 If window doesnot exist then this function returns 0 Difference between 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 gt GUI_TIMEOUT to change the default waiting time Refer http cvs freedesktop org ldtp pyldtp ldtp c 3 28 3 Implementation returns 1 on success and 0 on no existing window Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 29 waittillguinotexist 14 3 28 4 Example waittillguiexist dlgOpen 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 Author Nagappan lt nagappan gmail com gt 3 29 waittillguinotexist 3 29 1 Syntax waittillguinotexist lt window name gt 3 29 2 Description If the given window name does not exist this function returns 1 If window exist then this function returns 0 Difference between guiexist and waitguinotexist is waitguino texist waits for maximum 30 seconds Still the window does not disappear then 0 is returned We can set the environment variable gt GUI_TIMEOUT to change the default waiting time Refer http cvs free
47. n name to appear Return values 1 if window exist and 0 otherwise Refer http cvs freedesktop org ldtp pyldtp ldtputils py 3 157 3 Example waitwinname Mozilla Firefox 3 157 4 Dependency Itfx binary http sourceforge net projects 1tfx Author Nagappan lt nagappan gmail com gt Shankar Ganesh lt shagan glare gmail com gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 158 waitwinpartialname 97 3 158 waitwinpartialname 3 158 1 Syntax waitwinpartialname window name gt 3 158 2 Description Wait for window with the given name partially matches to appear Return values 1 if window exist and 0 otherwise Refer http cvs freedesktop org ldtp pyldtp ldtputils py 3 158 3 Example waitwinpartialname Firefox 3 158 4 Dependency Itfx binary http sourceforge net projects 1tfx Author Nagappan lt nagappan gmail com gt Shankar Ganesh lt shagan glare gmail com gt 3 159 Todo List Page reinitldtp Page reinitldtp Page reinitldtp Page reinitldtp Page regwincallback Page regwincallback Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 159 Todo List 98 Page regwincallback Page regwincallback Page unregwincallback Page unregwincallback Page unregwincallback Page unregwincallback Page verifymenucheck Page verifymenucheck Page verifymenucheck Page verifymenucheck Page hidelist Page combo
48. nction key lt up gt for pressing up arrow key lt down gt for pressing down arrow key lt right gt for pressing right arrow key lt left gt for pressing left arrow key lt esc gt for pressing escape key lt space gt for pressing space bar lt home gt for pressing home key lt end gt for pressing end key lt pageup gt for pressing page up key lt pagedown gt for pressing page down key 3 155 4 Example typekey lt tab gt testing LDTP using Itfx lt enter gt Intially a tab key will be pressed and then text will be typed and then enter key will be pressed 3 155 5 Dependency Itfx binary http sourceforge net projects 1tfx Author Nagappan lt nagappan gmail com gt Shankar Ganesh lt shagan glare gmail com gt 3 156 activatewin 3 156 1 Syntax activatewin window name gt 3 156 2 Description Activate window based on the given name Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 157 waitwinname 96 Return values 1 if window exist and 0 otherwise Refer http cvs freedesktop org ldtp pyldtp ldtputils py 3 156 3 Example activatewin Mozilla Firefox 3 156 4 Dependency Itfx binary http sourceforge net projects 1tfx Author Nagappan lt nagappan gmail com gt Shankar Ganesh lt shagan glare gmail com gt 3 157 waitwinname 3 157 1 Syntax waitwinname lt window name gt 3 157 2 Description Wait for window with the give
49. ntation Return values 1 if action is performed else 0 Refer http cvs freedesktop org ldtp pyldtp scroll_bar c 3 79 4 Example from Idtp import For scroll bar item with respect to gedit scrolleft gedit scrollBar Author Aishwariya amp Kamakshi lt poorvaishoo yahoo com gt 3 80 scrollright 3 80 1 Syntax scrollright lt window name gt lt scroll component name gt 3 80 2 Description Move the horizontal scroll bar to the extreme right 3 80 3 Implementation Return values 1 if action is performed else 0 Refer http cvs freedesktop org ldtp pyldtp scroll_bar c 3 80 4 Example from Idtp import For scroll bar item with respect to gedit scrollright gedit scrollBar Author Aishwariya amp Kamakshi lt poorvaishoo yahoo com gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 81 scrollup 49 3 81 scrollup 3 81 1 Syntax scrollup lt window name gt lt scroll component name gt 3 81 2 Description Move the vertical scroll bar to the extreme top 3 81 3 Implementation Return values 1 if action is performed else 0 Refer http cvs freedesktop org ldtp pyldtp scroll_bar c 3 81 4 Example from ldtp import For scroll bar item with respect to gedit scrollup gedit scrollBar Author Aishwariya amp Kamakshi lt poorvaishoo yahoo com gt 3 82 setmax 3 82 1 Syntax setmax lt wind
50. ow name gt lt slider name gt 3 82 2 Description Set the slider to the maximum value 3 82 3 Implementation Return values 1 if action is performed else 0 Refer http cvs freedesktop org ldtp pyldtp slider c Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 83 setmin 50 3 82 4 Example from ldtp import For slider component with respect to gnome terminal setmax dlgEditingProfile Default slider Author Aishwariya amp Kamakshi lt poorvaishoo yahoo com gt 3 83 setmin 3 83 1 Syntax setmin window name gt lt slider name gt 3 83 2 Description Set the slider to the minimum value 3 83 3 Implementation Return values 1 if action is performed else 0 Refer http cvs freedesktop org ldtp pyldtp slider c 3 83 4 Example from Idtp import For slider component with respect to gnome terminal setmin dlgEditingProfile Default slider Author Aishwariya amp Kamakshi lt poorvaishoo yahoo com gt 3 84 getslidervalue 3 84 1 Syntax Todo Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 85 increase 51 3 84 2 Description Todo 3 84 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp slider c 3 84 4 Example Todo Author Aishwariya amp Kamakshi lt poorvaishoo yahoo com gt 3 85 increase 3 85 1 Syntax increase lt window name gt lt slider name gt
51. ox txtUser in gftp gtk Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 46 getcharactercount 27 Author Shagan lt shagan glare gmail com gt 3 46 getcharactercount 3 46 1 Syntax getcharactercount window name gt lt component name gt 3 46 2 Description Return the number of characters present in the component identified by the lt component name gt 3 46 3 Implementation Return values number of characters Refer http cvs freedesktop org ldtp pyldtp text c 3 46 4 Example With respect to gedit getcharactercount gedit txt0 This will return the number of characters in the file presently open Author Premkumar J lt prem jothimani gmail com gt 3 47 cuttext 3 47 1 Syntax cuttext lt window name gt lt component name gt lt startindex gt lt endindex gt 3 47 2 Description Cut the text from startindex till the endindex in the component given by the component name Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 48 copytext 28 3 47 3 Implementation Return values 1 on success and 0 otherwise Refer http cvs freedesktop org ldtp pyldtp text c 3 47 4 Example With respect to gedit tool structure cuttext gedit txtName 1 3 This is to cut the text from the startindex position till the endindex in the txtName field Author Kamakshi lt poorvakrishna yahoo com gt 3 48 copytext
52. p c 3 31 4 Example Todo Author Nagappan lt nagappan gmail com gt 3 32 regwincallback 3 32 1 Syntax Todo 3 32 2 Description Todo 3 32 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp ldtp c 3 32 4 Example Todo Author Nagappan lt nagappan gmail com gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 33 unregwincallback 18 3 33 unregwincallback 3 33 1 Syntax Todo 3 33 2 Description Todo 3 33 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp ldtp c 3 33 4 Example Todo Author Nagappan lt nagappan gmail com gt 3 34 check 3 34 1 Syntax check lt window name gt lt component name gt 3 34 2 Description Check tick the check box state 3 34 3 Implementation Return values 1 if state is checked else 0 Refer http cvs freedesktop org ldtp pyldtp check_box c Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 35 uncheck 19 3 34 4 Example from ldtp import For check menu item with respect to gedit menu check gedit mnuOutputWindow For check menu item with respect to gedit menu check gedit mnuToolbar For check box with respect to gedit preferences check dlgPreferences cboxEnableAutoIndentation Author Nagappan lt nagappan gmail com gt Khasim Shaheed lt khasim shaheed gmail com gt 3 35 uncheck 3 35 1 Syntax uncheck
53. seconds wait 5 Author Nagappan lt nagappan gmail com gt Shankar Ganesh lt shagan glare gmail com gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 149 launchapp 91 3 149 launchapp 3 149 1 Syntax launchapp application binary name gt use additional environment variables for accessibility second argument is optional and its default argument is 0 If second argument is passed as 1 then GTK_MODULES and GNOME_ACCESSIBILITY will be added to the enivronment variable 3 149 2 Description Application name specified as an argument will be launched Refer http cvs freedesktop org ldtp pyldtp ldtputils py 3 149 3 Example Launch file roller application launchapp file roller Author Nagappan lt nagappan gmail com gt Shankar Ganesh lt shagan glare gmail com gt 3 150 processrunning 3 150 1 Syntax processrunning lt process name gt 3 150 2 Description If the given process name is running then return else run 0 Refer http cvs freedesktop org ldtp pyldtp ldtputils py 3 150 3 Example processrunning gnome terminal Note process name should be the same name as the name you see when you run ps ax command from terminal Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 151 getactivewin 92 Author Nagappan lt nagappan gmail com gt Shankar Ganesh lt shagan glare gmail com gt 3 151 getactivewin 3 151 1 Syntax
54. select Page selectindex Page settextvalue settextvalue lt dlgName gt lt cmbName gt lt argument gt Page showlist Page verifydropdown Page verifydropdown Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 159 Todo List 99 Page verifydropdown Page verifydropdown Page verifyhidelist Page verifyshowlist Page verifyselect Page rightclick Page rightclick Page rightclick Page rightclick Page getlabel Page getlabel Page getlabel Page getlabel Page selectitem Page selectitem Page selectitem Page selectitem Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 159 Todo List 100 Page selecttextitem Page selecttextitem Page selecttextitem Page selecttextitem Page selectmenuitem Page stateenabled Radiobutton Page verifytogglebutton Page verifytogglebutton Page verifytogglebutton Page verifytogglebutton Page getslidervalue Page getslidervalue Page getslidervalue Page getslidervalue Page settablecell Page settablecell Page settablecell Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 159 Todo List 101 Page settablecell Page openevent Page openevent Page openevent Page openevent Page sortcolumn Page sortcolumn Page sortcolumn Page sortcolumn Page sortcolumnindex Page sortcolumnindex Page sortcolumnindex Page sortcolumnindex Page expandtablece
55. t lt value of row in first column gt 3 70 2 Description Selects the row in table whose first column s Oth column value is same as the contents of the third argument in the function call 3 70 3 Implementation Return values 1 on success and 0 on error Refer http cvs freedesktop org ldtp pyldtp table c http cvs freedesktop org ldtp pyldtp tree_table c 3 70 4 Example from Idtp import With respect to gedit open dialog selectrow dlgOpen dlgFiles readme Author Nagappan A lt nagappan gmail com gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 71 selectrowindex 43 3 71 selectrowindex 3 71 1 Syntax selectrowindex lt window name gt lt table name gt lt row index 3 71 2 Description Selects the row with the given index value in table Index value starts from 0 3 71 3 Implementation Return values 1 on success and 0 on error Refer http cvs freedesktop org ldtp pyldtp table c http cvs freedesktop org ldtp pyldtp tree_table c 3 71 4 Example from Idtp import With respect to gedit open dialog selectrowindex dlgOpen dlgFiles 0 Author Nagappan A lt nagappan gmail com gt 3 72 selectrowpartialmatch 3 72 1 Syntax selectrowpartialmatch lt window name gt gt lt tree table name gt gt lt texttobesearchedfor gt 3 72 2 Description selects the row having cell that contains the given text
56. tem functions To operate on a menuitem object and based on your requirement you can use any of these functions 3 10 2 Menuitem python API s doesmenuitemexist listsubmenus selectmenuitem 3 11 Panel functions 3 11 1 About Panel functions To operate on a panel object and based on your requirement you can use any of these functions 3 11 2 Panel python API s selectpanel selectpanelname 3 12 Process Statistics functions 3 12 1 About Process Statistics functions To monitor the CPU and memory utilization you can use this class 3 12 2 Process Statistics python API s Classpstats Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 13 Pushbutton functions 7 3 13 Pushbutton functions 3 13 1 About Pushbutton functions To operate on a push button object and based on your requirement you can use any of these functions 3 13 2 Pushbutton python API s click stateenabled verifypushbutton 3 14 Radiobutton functions 3 14 1 About Radiobutton functions To operate on a radio button object and based on your requirement you can use any of these functions 3 14 2 Radiobutton python API s click check stateenabled verifycheck verifyuncheck 3 15 Radiomenuitem functions 3 15 1 About Radiomenuitem functions To operate on a radio menuitem object and based on your requirement you can use any of these functions 3 15 2 Radiomenuitem python API s click check selectmenuitem verif
57. tions 3 20 2 Table python API s activatetablerow checkrow doesrowexist doubleclickrow getcellvalue getrowcount gettablerowindex Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 21 Text functions 10 selectlastrow selectrow selectrowindex selectrowpartialmatch settablecelldata uncheckrow verifycellvalue verifypartialcellvalue 3 21 Text functions 3 21 1 About Text functions To operate on a text object and based on your requirement you can use any of these functions 3 21 2 Text python API s activatetext appendtext copytext cuttext deletetext getcharactercount gettextvalue grabfocus inserttext pastetext settextvalue verifypartialmatch verifysettext 3 22 Togglebutton functions 3 22 1 About Togglebutton functions To operate on a toggle object and based on your requirement you can use any of these functions Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 23 Toolbar functions 11 3 22 2 Togglebutton python API s click verifyclick 3 23 Toolbar functions 3 23 1 About Toolbar functions To operate on a toolbar object and based on your requirement you can use any of these functions 3 23 2 Toolbar python API s verifybuttoncount verify visiblebuttoncount 3 24 Treetable functions 3 24 1 About Treetable functions To operate on a tree table object and based on your requirement you can use any of these functions 3 24 2 Treetable python API
58. tton c Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 68 getvalue 41 3 67 4 Example Creation of Appointment in Evolution setvalue dlgAppointment Nosummary sbtnOccurence 2 Author Thanikachalam S lt thanikal999 yahoo com gt 3 68 getvalue 3 68 1 Syntax getvalue lt window name gt lt spinbutton name gt lt value gt 3 68 2 Description Gets the value in the spin button 3 68 3 Implementation Return values value in the spin button on success and 0 on error Refer http cvs freedesktop org ldtp pyldtp spin_button c 3 68 4 Example Creation of Appointment in Evolution getvalue dlgAppointment Nosummary sbtnOccurence Author Thanikachalam S lt thanikal999 yahoo com gt 3 69 verifysetvalue 3 69 1 Syntax verifysetvalue lt window name gt lt spinbutton name gt lt value gt 3 69 2 Description Verifies the value set in spin button Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 70 selectrow 42 3 69 3 Implementation Return values 1 on success and 0 on error Refer http cvs freedesktop org ldtp pyldtp spin_button c 3 69 4 Example In the Creation of Appointment verifysetvalue dlgAppointment Nosummary sbtnOccurence 2 Author sheetal lt svnayak18 yahoo com gt 3 70 selectrow 3 70 1 Syntax selectrow lt window name gt lt table name g
59. utregion infile outfile topx topy botx boty 3 145 2 Description Blacks out the region in the image given by top coords topx topy bottom coords botx boty of the region 3 145 3 Implementation Refer http cvs freedesktop org ldtp pyldtp ldtputils py 3 145 4 Example blackoutregion in jpg out jpg 100 100 200 200 3 145 5 Dependency Python Imaging Library http www pythonware com products pil Author Shankar Ganesh lt shagan glare gmail com gt 3 146 Class pstats 3 146 1 Syntax lt Object gt pstats lt application name gt lt time interval gt lt Object gt start lt Object gt stopQ Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 147 closeappwindow 89 3 146 2 Description This process when run gathers the Memory usage and CPU utilization of all the pro cesses of a particular application at specific time interval 3 146 3 Implementation When this functionality is to be used in a python test script you need to create a new object for pstats class The arguments passed while instantiating this class are Application name and Time interval As soon as the lt Object gt start method is called in the test script memory usage and CPU utilization of the application start getting logged into the ldtp log file When lt Object gt stop is called the thread gathering the information stops Refer http cvs freedesktop org ldtp pyldtp ldtputils py 3 1
60. utton lt window name gt lt component name gt 3 65 2 Description Verify whether the given object is push button or not 3 65 3 Implementation Returns 1 if object is push button else 0 Refer http cvs freedesktop org ldtp pyldtp push_button c 3 65 4 Example With respect to gedit open dialog window verify open button is push button or not verifypushbutton dlgOpenFile btnOpen Author Nagappan A lt nagappan gmail com gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 66 stateenabled 40 3 66 stateenabled 3 66 1 Syntax stateenabled window name gt lt component name gt 3 66 2 Description Checks the radio button object state enabled or not 3 66 3 Implementation Returns 1 if state is enabled else 0 Refer http cvs freedesktop org ldtp pyldtp push_button c http cvs freedesktop org ldtp pyldtp radio_button c 3 66 4 Example Push button With respect to gedit open dialog this function checks open button state enabled or not stateenabled dlgOpenFile btnOpen Todo Radiobutton Author Nagappan A lt nagappan gmail com gt 3 67 setvalue 3 67 1 Syntax setvalue window name gt lt spinbutton name gt lt value gt 3 67 2 Description Sets the value of the spin button 3 67 3 Implementation Return values 1 on success and 0 on error Refer http cvs freedesktop org l1dtp pyldtp spin bu
61. will not be appened to the log file 3 142 4 Example stoplog Author Nagappan lt nagappan gmail com gt 3 143 imagecapture 3 143 1 Syntax imagecapture lt window name gt lt output file gt opt lt resolution x gt opt lt resolution y gt opt startx opt starty Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 144 imagecompare 87 3 1432 Description Capture snap shot of the window Where startx amp starty are offset 3 143 3 Implementation Refer http cvs freedesktop org ldtp pyldtp ldtputils py 3 143 4 Example imagecapture Terminal out png Note Window title name is case sensitive 3 143 5 Dependency Digwin binary http sourceforge net projects 1tfx Python Imaging Library http www pythonware com products pil Author Nagashree lt mnagashree novell com gt 3 144 imagecompare 3 144 1 Syntax imagecompare imgfile1 imgfile2 3 144 2 Description Compares two images and returns difference of them in percentage 3 144 3 Implementation Refer http cvs freedesktop org ldtp pyldtp ldtputils py 3 144 4 Example imagecompare in jpg out jpg Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 145 blackoutregion 88 3 144 5 Dependency Python Imaging Library http www pythonware com products pil Author Veerapuram Varadhan lt v varadhan gmail com gt 3 145 blackoutregion 3 145 1 Syntax blacko
62. x Author Nagappan lt nagappan gmail com gt Shankar Ganesh lt shagan glare gmail com gt 3 154 activatewinpartialname 3 154 1 Syntax activatewinpartialname lt window name gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 155 typekey 94 3 154 2 Description Activate window based on the given name that matches partially Return values 1 if window exist and 0 otherwise Refer http cvs freedesktop org ldtp pyldtp ldtputils py 3 154 3 Example activatewinpartialname Firefox 3 154 4 Dependency Itfx binary http sourceforge net projects 1tfx Author Nagappan lt nagappan gmail com gt Shankar Ganesh lt shagan glare gmail com gt 3 155 typekey 3 155 1 Syntax typekey string to be typed gt 3 155 2 Description On the current focus area the string given as argument will be typed Refer http cvs freedesktop org ldtp pyldtp ldtputils py 3 155 3 Implementation Return values 1 if window exist and 0 otherwise This function supports lt alt gt for alt key lt ctrl gt for control key lt shift gt for pressing shift key lt enter gt for pressing enter key lt tab gt for pressing tab key Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 156 activatewin 95 lt del gt for pressing del key lt bksp gt for pressing back space key lt f1 gt for pressing F1 function key lt f12 gt for pressing F1 fu
63. y 3 119 1 Syntax Todo 3 119 2 Description Todo 3 119 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp text c 3 119 4 Example Todo Author Premkumar J lt prem jothimani gmail com gt 3 120 selectcalendardate 3 120 1 Syntax Todo 3 120 2 Description Todo Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 121 remap 73 3 120 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp calendar c 3 120 4 Example Todo Author Premkumar J lt prem jothimani gmail com gt 3 121 remap 3 121 1 Syntax remap lt application name gt lt dialog name gt undoremap lt application name gt lt dialog name gt 3 121 2 Description 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 Please not that the lt application name gt should be same as the one given as the commmand line argument for appmap generation 3 121 3 Implementation It uses the same logic that app
64. ycheck Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 16 Scrollbar functions 8 verifyuncheck 3 16 Scrollbar functions 3 16 1 About Scrollbar functions To operate on a scrollbar object and based on your requirement you can use any of these functions 3 16 2 Scrollbar python API s onedown oneleft oneright oneup scrolldown scrollleft scrollright scrollup verifyscrollbar verifyscrollbarhorizontal verifyscrollbarvertical 3 17 Slider functions 3 17 1 About Slider functions To operate on a slider object and based on your requirement you can use any of these functions 3 17 2 Slider python API s decrease increase setmax setmin verifyslider verifysliderhorizontal verifyslidervertical Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 18 Spinbutton functions 9 3 18 Spinbutton functions 3 18 1 About Spinbutton functions To operate on a spin button object and based on your requirement you can use any of these functions 3 18 2 Spinbutton python API s getvalue setvalue verifysetvalue 3 19 Tabcontrol functions 3 19 1 About Tabcontrol functions To operate on a page tab object and based on your requirement you can use any of these functions 3 19 2 Tabcontrol python API s selecttab selecttabindex 3 20 Table functions 3 20 1 About Table functions To operate on a table object and based on your requirement you can use any of these func
65. ygen 3 116 capturetofile 70 3 115 3 Implementation returns the string Refer http cvs freedesktop org ldtp pyldtp table c Refer http cvs freedesktop org ldtp pyldtp tree_table c 3 115 4 Example With respect to Evolution Messages tree table gettextvalue Evolution Mail treetblMails 2 4 This will return the subject of 3rd message in the message list Author Khasim Shaheed lt khasim shaheed gmail com gt Premkumar J lt prem jothimani gmail com gt 3 116 capturetofile 3 116 1 Syntax Todo 3 116 2 Description Todo 3 116 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp combo_box c 3 116 4 Example Todo Author Premkumar J lt prem jothimani gmail com gt Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 117 gettextproperty 71 3 117 gettextproperty 3 117 1 Syntax Todo 3 117 2 Description Todo 3 117 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp text c 3 117 4 Example Todo Author Premkumar J lt prem jothimani gmail com gt 3 118 comparetextproperty 3 118 1 Syntax Todo 3 118 2 Description Todo 3 118 3 Implementation Todo Refer http cvs freedesktop org ldtp pyldtp text c Generated on Sat Nov 19 14 38 57 2005 for LDTP by Doxygen 3 119 containstextproperty 72 3 118 4 Example Todo Author Premkumar J lt prem jothimani gmail com gt 3 119 containstextpropert

Download Pdf Manuals

image

Related Search

Related Contents

Meccano 835560  Princess Table Grill Fun XL  StarTech.com USB DVI KVM Console IP Extender over Cat5 with Audio - 1680x1050 330 ft (100m)  User`s Manual  Triarch 75366/10 User's Manual  Dishwasher - Appliances Online  ¡3?0丐 ²(!部y± ²%!1 ²-J!※ ²(!都y± ²#Q!釩y± ²81部{± ²#Q!閉y± ²%!旭  USER MANUAL - Sanitec bvba  HK Audio LUCAS Performer  Weider WEEVSY8721 User's Manual  

Copyright © All rights reserved.
Failed to retrieve file