/* * Linux Desktop Testing Project http://ldtp.freedesktop.org/ * * Author * Nagappan Alagappan * Premkumar J * * Copyright 2004 - 2007 Novell, Inc. * Copyright 2008 - 2013 Nagappan Alagappan * * Permission is granted to copy, distribute and/or modify this document * under the terms of the GNU Lesser General Public License, Version 2 * or any later version published by the Free Software Foundation; * with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. * A copy of the license is included in the section entitled "GNU * Lesser General Public License". * * You should have received a copy of the GNU GNU Lesser General Public * License along with this documentation; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** \mainpage LDTP User manual * * \section AboutLDTP About LDTP * * Linux Desktop Testing Project(LDTP) is aimed at producing high * quality test automation 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 also has tools to record test-cases based * on user-selection on the application. For more information check * our site - http://ldtp.freedesktop.org * * \section scriptwritter Components list * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* \subpage checkbox * * \subpage checkmenuitem * * \subpage combobox * * \subpage embeddedcomponent *
* \subpage general * * \subpage imaging * * \subpage icon * * \subpage layeredpane * * \subpage list *
* \subpage logging * * \subpage menuitem * * \subpage pagetablist * * \subpage panel * * \subpage ProcessStatistics * * \subpage pushbutton *
* \subpage radiobutton * * \subpage radiomenuitem * * \subpage scrollbar * * \subpage slider * * \subpage spinbutton * * \subpage statusbar *
* \subpage table * * \subpage text * * \subpage togglebutton * * \subpage toolbar * * \subpage treetable * * \subpage Window *
* \subpage WNCK-WindowOp *
* * Linux Desktop Testing Project * */ /** \page checkbox checkbox * \section CheckboxSection About Checkbox functions * * To operate on a check box object and based on your requirement, you can use any of these functions * * \section CheckboxAPI Checkbox python API's * * \subpage check - Tick the check box * \n * \n * \subpage click - Click on the check box * \n * \n * \subpage stateenabled - Checks whether the check box is in enabled state or not * \n * \n * \subpage uncheck - Un tick the check box * \n * \n * \subpage verifycheck - Verify whether the check box is ticked * \n * \n * \subpage verifyuncheck - Verify whether the check box is unticked * */ /** \page checkmenuitem checkmenuitem * \section CheckmenuitemSection About Checkmenuitem functions * * To operate on a check menuitem object and based on your requirement, you can use any of these functions * * \section CheckmenuitemAPI Checkmenuitem python API's * * \subpage click - Click on the check menu item * \n * \n * \subpage menuitemenabled - Verify whether the check menu item is enabled * \n * \n * \subpage menucheck - Tick the menu item * \n * \n * \subpage menuuncheck - Un tick the menu item * \n * \n * \subpage selectmenuitem - Select the menu item * \n * \n * \subpage verifymenucheck - Verify whether the check menu item is ticked * \n * \n * \subpage verifymenuuncheck - Verify whether the check menu item is unticked * */ /** \page combobox combobox * \section ComboboxSection About Combobox functions * * To operate on a combobox object and based on your requirement, you can use any of these functions * * \section ComboboxAPI Combobox python API's * * \subpage click - Click on a combo box * \n * \n * \subpage comboselect - Select an item from the combo box list or * menu item based on name * \n * \n * \subpage comboselectindex - Select an item from the combo box list or * menu item based on index * \n * \n * \subpage getallitem - Get all the items from combo box list * \n * \n * \subpage getcombovalue - Get current combobox selected value * \n * \n * \subpage hidelist - Hide the combo box drop down list * \n * \n * \subpage selectindex - Select combo box item based on index * \n * \n * \subpage selectitem - Select an item from the combo box list or * menu item based on name * \n * \n * \subpage settextvalue - Set a text in the combo box list * \n * \n * \subpage showlist - Show the combo box drop down list * \n * \n * \subpage verifydropdown - Verify whether the drop down list pops up * \n * \n * \subpage verifyhidelist - Verify whether the drop down list is in * hidden state * \n * \n * \subpage verifyselect - Verify whether the item is selected in the * combo box list * \n * \n * \subpage verifysettext - Verify whether the text set is available * \n * \n * \subpage verifyshowlist - Verify whether the drop down list is * displayed * */ /** \page general general * \section GeneralSection About General functions * * General ldtp functions. Based on your requirement, you can use any of these functions * * \section GeneralAPI General python API's * * \subpage appundertest - Application under test * \n * \n * \subpage generatekeyevent - Generate keyboard event on currently * focused window * \n * \n * \subpage generatemouseevent - Generate mouse event based on x, y coordinates * \n * \n * \subpage getaccesskey - Get access key of given control * \n * \n * \subpage getallstates - Get list of available states of an object * \n * \n * \subpage hasstate - Checks whether the object has a state * \n * \n * \subpage keypress - Generate keyboard press event * \n * \n * \subpage keyrelease - Generate keyboard press event * \n * \n * \subpage launchapp - Launch application * \n * \n * \subpage remap - Force remap the window information * \n * \n * \subpage simulatemousemove - Simulate mouse move * \n * \n * \subpage wait - Suspend the operation for specified duration * */ /** \page imaging imaging * \section ImagingSection About Imaging functions * * To manipulate with image processing and based on your requirement, you can use any of these functions * * \section ImagingAPI Imaging python API's * * \subpage blackoutregion - Black out the specified region in the image * \n * \n * \subpage imagecapture - Capture the screen shot of a window * \n * \n * \subpage imagecompare - Compare two images * */ /** \page layeredpane layeredpane * \section LayeredpaneSection About Layeredpane functions * * To operate on a layered pane object and based on your requirement, you can use any of these functions * * \section LayeredpaneAPI Layeredpane python API's * * \subpage ischildindexselected - Is child selected in the complete * list based on index * \n * \n * \subpage ischildselected - Is child selected in the complete list * based on name * \n * \n * \subpage rightclick - Generate right click event * \n * \n * \subpage selectall - Select all the item * \n * \n * \subpage selectindex - Select item based on index * \n * \n * \subpage selectitem - Select an item * \n * \n * \subpage selecteditemcount - Selected item count * \n * \n * \subpage unselectall - Unselect all the item * \n * \n * \subpage unselectindex - Unselect item based on index * \n * \n * \subpage unselectitem - Unselect an item * \n * \n * \subpage unselectitemindex - Unselect item based on index from the * selected item * */ /** \page list list * \section ListSection About List functions * * To operate on a list object and based on your requirement, you can use any of these functions * * \section ListAPI List python API's * * \subpage selectindex - Select the item in the list based on index * */ /** \page logging logging * \section LoggingSection About Logging functions * * Log functions are used to log the operations performed. Output format of log file is XML file * * \section LoggingAPI Logging python API's * * \subpage addlogger - Add more logging handler * \n * \n * \subpage ldtplog - Log the operations in LDTP engine side * \n * \n * \subpage log - Log the operations * \n * \n * \subpage setloglevel - Set the level of logging * \n * \n * \subpage startlog - Start logging to a file * \n * \n * \subpage stoplog - Stop logging to a file * */ /** \page menuitem menuitem * \section MenuitemSection About Menuitem functions * * To operate on a menuitem object and based on your requirement, you can use any of these functions * * \section MenuitemAPI Menuitem python API's * * \subpage click - Click on the menu item * \n * \n * \subpage doesmenuitemexist - Check whether a menu item exist * \n * \n * \subpage invokemenu - Invoke a menu in embedded component * \n * \n * \subpage listsubmenus - Get list of menu items under a menu * \n * \n * \subpage menuitemenabled - Verify whether the menu item is enabled * \n * \n * \subpage selectmenuitem - Select the given menu item * */ /** \page panel panel * \section PanelSection About Panel functions * * To operate on a panel object and based on your requirement, you can use any of these functions * * \section PanelAPI Panel python API's * * \subpage selectpanel - Select panel based on index * \n * \n * \subpage selectpanelname - Select panel based on name * */ /** \page ProcessStatistics ProcessStatistics * \section ProcessStatisticsSection About Process Statistics functions * * To monitor the CPU and memory utilization you can use these functions * * NOTE: You need to have libstatgrab >= 0.16 and python-statgrab >= 0.5 installed to use any of these APIs * * \section ProcessStatisticsAPI Process Statistics python API's * * \subpage startprocessmonitor - Start monitoring CPU / Memory utilization * * \subpage stopprocessmonitor - Stop monitoring CPU / Memory utilization * * \subpage getcpustat - Get CPU utilization of the given process * * \subpage getmemorystat - Get Memory utilization of the given process * */ /** \page pushbutton pushbutton * \section PushbuttonSection About Pushbutton functions * * To operate on a push button object and based on your requirement, you can use any of these functions * * \section PushbuttonAPI Pushbutton python API's * * \subpage click - Generates mouse left click event on the object * \n * \n * \subpage mouseleftclick - Generate mouse left click event * \n * \n * \subpage stateenabled - Checks whether the push button is in * enabled state * \n * \n * \subpage verifypushbutton - Verify whether the object is a push button * */ /** \page radiobutton radiobutton * \section RadiobuttonSection About Radiobutton functions * * To operate on a radio button object and based on your requirement, you can use any of these functions * * \section RadiobuttonAPI Radiobutton python API's * * \subpage click - Click on a radio button * \n * \n * \subpage check - Select the radio button * \n * \n * \subpage stateenabled - Checks whether the radio button is in * enabled state or not * \n * \n * \subpage verifycheck - Verify whether the radio button is selected * \n * \n * \subpage verifyuncheck - Verify whether the radio button is deselected * */ /** \page radiomenuitem radiomenuitem * \section RadiomenuitemSection About Radiomenuitem functions * * To operate on a radio menuitem object and based on your requirement, you can use any of these functions * * \section RadiomenuitemAPI Radiomenuitem python API's * * \subpage click - Click on a radio menu item * \n * \n * \subpage menuitemenabled - Verify whether the radio menu item is enabled * \n * \n * \subpage menucheck - Select the radio menu item * \n * \n * \subpage selectmenuitem - Select the radio menu item * \n * \n * \subpage verifymenucheck - Verify whether the radio menu item is selected * \n * \n * \subpage verifymenuuncheck - Verify whether the radio menu item is deselected * */ /** \page scrollbar scrollbar * \section ScrollbarSection About Scrollbar functions * * To operate on a scrollbar object and based on your requirement, you can use any of these functions * * \section ScrollbarAPI Scrollbar python API's * * \subpage onedown - Scroll down one time * \n * \n * \subpage oneleft - Scroll left one time * \n * \n * \subpage oneright - Scroll right one time * \n * \n * \subpage oneup - Scroll up one time * \n * \n * \subpage scrolldown - Scroll down * \n * \n * \subpage scrollleft - Scroll left * \n * \n * \subpage scrollright - Scroll right * \n * \n * \subpage scrollup - Scroll up * \n * \n * \subpage verifyscrollbar - Verify whether the object is scroll bar * \n * \n * \subpage verifyscrollbarhorizontal - Verify whether the object is * horizontal scroll bar * \n * \n * \subpage verifyscrollbarvertical - Verify whether the object is * vertical scroll bar * */ /** \page slider slider * \section SliderSection About Slider functions * * To operate on a slider object and based on your requirement, you can use any of these functions * * \section SliderAPI Slider python API's * * \subpage decrease - Decrease the slider * \n * \n * \subpage getmax - Get the slider to max value * \n * \n * \subpage getmin - Get the slider to min value * \n * \n * \subpage getminincrement - Get min increment value of slider * \n * \n * \subpage getslidervalue - Get the slider value * \n * \n * \subpage increase - Increase the slider * \n * \n * \subpage setmax - Set the slider to max value * \n * \n * \subpage setmin - Set the slider to min value * \n * \n * \subpage verifyslider - Verify whether the object is slider * \n * \n * \subpage verifysliderhorizontal - Verify whether the object is * horizontal slider * \n * \n * \subpage verifyslidervertical - Verify whether the object is * vertical slider * */ /** \page spinbutton spinbutton * \section SpinbuttonSection About Spinbutton functions * * To operate on a spin button object and based on your requirement, you can use any of these functions * * \section SpinbuttonAPI Spinbutton python API's * * \subpage getvalue - Get value from spin button * \n * \n * \subpage getmaxvalue - Get max value of spin button * \n * \n * \subpage getminincrement - Get min increment value of spin button * \n * \n * \subpage getminvalue - Get min value of spin button * \n * \n * \subpage setvalue - Set value in spin button * \n * \n * \subpage verifysetvalue - Verify the value of spin button with the * given value * */ /** \page pagetablist pagetablist * \section PagetabSection About Pagetab functions * * To operate on a page tab object and based on your requirement, you can use any of these functions * * \section PagetabAPI Pagetab python API's * * \subpage gettabcount - Get number of tabs in a page tab list * \n * \n * \subpage gettabname - Get name of a tab in the page tab list * \n * \n * \subpage selecttab - Select tab based on tab name * \n * \n * \subpage selecttabindex - Select tab based on tab index * \n * \n * \subpage verifytabname - Verify tab name is selected or not * */ /** \page statusbar statusbar * \section StatusbarSection About Statusbar functions * * To operate on a status bar object and based on your requirement, you can use any of these functions * * \section PagetabAPI Pagetab python API's * * \subpage getstatusbartext - Get text displayed in status bar * \n * \n * \subpage verifystatusbar - Verify the status bar text with the * given text * \n * \n * \subpage verifystatusbarvisible - Verify whether the status bar * object is visible * */ /** \page table table * \section TableSection About Table functions * * To operate on a table object and based on your requirement, you can use any of these functions * * \section TableAPI Table python API's * * \subpage checkrow - Tick the table cell row of type toggle button * \n * \n * \subpage doesrowexist - Checks whether the row with the given name exist * \n * \n * \subpage doubleclick - Generate double click event on the component * \n * \n * \subpage doubleclickrow - Generate double click event on the row * with matches the given name * \n * \n * \subpage getcellsize - Get the table cell size * \n * \n * \subpage getcellvalue - Get the table cell value * \n * \n * \subpage getrowcount - Get the rows count * \n * \n * \subpage gettablerowindex - Get the index of the row, where the * given name matches * \n * \n * \subpage handletablecell - Handle table cells in table, by default its turned off * \n * \n * \subpage multiselect - Select multiple rows with the given names * \n * \n * \subpage multiremove - Unselect multiple rows with the given names * \n * \n * \subpage selectlastrow - Select last row in the table * \n * \n * \subpage selectrow - Select a row with the given name * \n * \n * \subpage selectrowindex - Select a row with an index * \n * \n * \subpage selectrowpartialmatch - Select a row with the given * partial name * \n * \n * \subpage setcellvalue - Set the table cell value with the given value * \n * \n * \subpage singleclickrow - Generate single click event on the row * with matches the given name * \n * \n * \subpage uncheckrow - Un check the table cell of type toggle button * \n * \n * \subpage unhandletablecell - Don't handle table cells in table, by default its turned off * \n * \n * \subpage verifytablecell - Verify whether the cell value is same as * the given value * \n * \n * \subpage verifypartialtablecell - Verify whether the cell value * partially matches the given value * */ /** \page text text * \section TextSection About Text functions * * To operate on a text object and based on your requirement, you can use any of these functions * * \section TextAPI Text python API's * * \subpage activatetext - Activate the text * \n * \n * \subpage appendtext - Append the given text to the existing text * \n * \n * \subpage copytext - Copy text to clipboard * \n * \n * \subpage cuttext - Cut the text * \n * \n * \subpage deletetext - Deletes the text * \n * \n * \subpage enterstring - Genereate keyboard events as if user key-ins * \n * \n * \subpage getcharcount - Get the number of characters present in a * text field * \n * \n * \subpage getcursorposition - Get the current cursor position * \n * \n * \subpage gettextvalue - Get the text content * \n * \n * \subpage grabfocus - Grab the focus * \n * \n * \subpage inserttext - Insert a text in specified location * \n * \n * \subpage istextstateenabled - Verify whether the text field is enabled * \n * \n * \subpage mouseleftclick - Generate mouse left click event * \n * \n * \subpage mouserightclick - Generate mouse right click event * \n * \n * \subpage mousemove - Simulate mouse move event * \n * \n * \subpage pastetext - Paste the text from clip board to the text area * \n * \n * \subpage rightclick - Generate right click event * \n * \n * \subpage setcursorposition - Move the cursor position to the * specified location * \n * \n * \subpage settextvalue - Sets the text value in the text field * \n * \n * \subpage verifypartialmatch - Verify whether the given text * partially matches with the existing text * \n * \n * \subpage verifysettext - Verify whether the given text is same as * the text available in the text field * */ /** \page togglebutton togglebutton * \section TogglebuttonSection About Togglebutton functions * * To operate on a toggle object and based on your requirement, you can use any of these functions * * \section TogglebuttonAPI Togglebutton python API's * * \subpage click - Click on a toggle button * \n * \n * \subpage enterstring - Generate keyboard event as if user keys-in * \n * \n * \subpage press - Toggle's the button state * \n * \n * \subpage stateenabled - Checks whether the toggle button is in * enabled state or not * \n * \n * \subpage verifytoggled - Verify whether the button is in toggled state * */ /** \page embeddedcomponent embeddedcomponent * \section EmbeddedcomponentSection About Embeddedcomponent functions * * To operate on a embedded component(accessible) object and based on your requirement, you can use any of these functions * * \section EmbeddedcomponentAPI Embeddedcomponent python API's * * \subpage click - Click on an embedded component object * \n * \n * \subpage enterstring - Generate keyboard event as if user keys-in * \n * \n * \subpage invokemenu - Invokes the menu in an embedded component object * \n * \n * \subpage rightclick - Right clicks on an embedded component object * */ /** \page toolbar toolbar * \section ToolbarSection About Toolbar functions * * To operate on a toolbar object and based on your requirement, you can use any of these functions * * \section ToolbarAPI Toolbar python API's * * \subpage verifybuttoncount - Verify the number of buttons matches * with the given button count * \n * \n * \subpage verifyvisiblebuttoncount - Verify the visible number of * buttons matches the given button count * */ /** \page treetable treetable * \section TreetableSection About Treetable functions * * To operate on a tree table object and based on your requirement, you can use any of these functions * * \section TreetableAPI Treetable python API's * * \subpage checkrow - Tick the table cell row of type toggle button * \n * \n * \subpage doesrowexist - Checks whether the row with the given name exist * \n * \n * \subpage doubleclick - Generate double click event on the component * \n * \n * \subpage doubleclickrow - Generate double click event on the row * which matches the given name * \n * \n * \subpage doubleclickrowindex - Generate double click event on the row * which matches the given index * \n * \n * \subpage expandtablecell - Expand or collapse tree table * \n * \n * \subpage getcellsize - Get the table cell size * \n * \n * \subpage getcellvalue - Get the table cell value * \n * \n * \subpage getrowcount - Get the rows count * \n * \n * \subpage multiselect - Select multiple rows with the given names * \n * \n * \subpage multiremove - Unselect multiple rows with the given names * \n * \n * \subpage rightclick - Generate right click event * \n * \n * \subpage selectlastrow - Select last row in the table * \n * \n * \subpage selectrow - Select a row with the given name * \n * \n * \subpage selectrowindex - Select a row with an index * \n * \n * \subpage selectrowpartialmatch - Select a row with the given * partial name * \n * \n * \subpage setcellvalue - Set the table cell value with the given value * \n * \n * \subpage singleclickrow - Generate single click event on the row * with matches the given name * \n * \n * \subpage uncheckrow - Un check the table cell of type toggle button * \n * \n * \subpage verifycheckrow - Verify whether the table cell of type * toggle button is ticked * \n * \n * \subpage verifytablecell - Verify whether the cell value is same as * the given value * \n * \n * \subpage verifypartialtablecell - Verify whether the cell value * partially matches the given value * \n * \n * \subpage verifyuncheckrow - Verify whether the table cell of type * toggle button is un-ticked * */ /** \page Window Window functions * \section WindowSection About Window functions * * Window based functions * \n * \n * * \section WindowAPI Window python API's * * \subpage activatewindow - Activate the given window name or all * open windows * \n * \n * \subpage closewindow - Close the given window name or all * open windows * \n * \n * \subpage deregisterevent - De-Register user defined window event * \n * \n * \subpage deregisterkbevent - De-Register user defined keyboard event * \n * \n * \subpage getapplist - Get list of accessibility enabled applications * \n * \n * \subpage getchild - Get child object of a window which matches label or role name or both * \n * \n * \subpage getobjectinfo - Get list of available property classes of an object * \n * \n * \subpage getobjectlist - Get list of objects in a window * \n * \n * \subpage getobjectproperty - Get a class(label, type) property of an object * \n * \n * \subpage getobjectnameatcoords - Get object name at the mouse coordinates * \n * \n * \subpage getobjectsize - Get size of the given object * \n * \n * \subpage getwindowlist - Get current list of window titles * \n * \n * \subpage getwindowsize - Get size of the given window title * \n * \n * \subpage guiexist - Checks whether a window exist * \n * \n * \subpage guitimeout - Modifies the global gui timeout period * \n * \n * \subpage objectexist - To check whether a component exist in a given window * \n * \n * \subpage objtimeout - Modifies the global object timeout period * \n * \n * \subpage onwindowcreate - Register callback function to be called * when the specified window is created * \n * \n * \subpage registerevent - Register user defined window event * \n * \n * \subpage registerkbevent - Register user defined keyboard event * \n * \n * \subpage removecallback - Remove the registered callback function using onwindowcreate * \n * \n * \subpage waittillguiexist - Suspend the operation till the window exist * \n * \n * \subpage waittillguinotexist - Suspend the operation till the * window quits * \n * \n * \subpage windowuptime - Uptime of any given window * */ /** \page WNCK-WindowOp WNCK-WindowOp functions * \section WnckWindowOpSection About Wnck based Window operation functions * * To operate on an window in which accessibility is not enabled we * use external application python wnck * \n * * \section WNCKAPI WNCK Window Op API's * * \subpage activatewindow - Activate the window with the given title * \n * \n * \subpage maximizewindow - Maximize the given window name or all * open windows * \n * \n * \subpage minimizewindow - Minimize the given window name or all * open windows * \n * \n * \subpage unmaximizewindow - Unmaximize the given window name or all * open windows * \n * \n * \subpage unminimizewindow - Unminimize the given window name or all * open windows * \n * \n * * \section WNCKAssumptions Assumptions * * WNCK functions assumes that the window to be operated is in * focus. It directly generates the X key board events. It does not * know whether the object exist or the operation is successfully * done. * */ /** \page icon icon * \section IconSection About Icon functions * * To operate on an icon object * * \section IconAPI Icon python API's * * \subpage rightclick - Generate right click event * */ /** * \page guiexist guiexist * \section Syntax * * guiexist('\'[, \]) * * \section Description * * If the given window name exist, this function returns 1. If window doesnot exist, then this function returns 0. * * Refer: * * Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Utils.cs * * \section ImplementationDetails * * \retval 1 on success and 0 on no existing window * * \section Example * * With respect to gedit Open dialog * * from ldtp import * * * # if GTK File selector is opened the following function will return 1, else 0 * * guiexist('dlgOpenFile...') * * guiexist('dlgOpenFile...', 'btnOpen') # Returns 1, If window exist and also the object exist * * guiexist('dlgOpenFile...', 'btnabc') # Returns 0 * * \author Nagappan Alagappan */ /** * \page waittillguiexist waittillguiexist * \section Syntax * * waittillguiexist('\'[, '\'[, guiTimeOut][, \<'state'\>]]) * * \section Description * * 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. * * \section section1 Different window types * * 1. Frame(frm) * * 2. Dialog(dlg) * * 3. Alert(dlg) * * 4. Font Chooser(dlg) * * 5. File Chooser(dlg) * * 6. Window(This type in general does not have any associated * title, so we need to represent them using index - dlg) * * \section section2 Glob Pattern support * * Window name can be clubbed with glob patterns(* or ?) * * \section section3 Different ways of representing window name * * 1. Window type and window title(Ex: * 'frmUnsavedDocument1-gedit') * * 2. Window title(Ex: 'Unsaved Document 1 - gedit') * * 3. Window type, glob expression and partial window title(Ex: * 'frm*-gedit') * * 4. Glob pattern and partial window title(Ex: '*-gedit') * * 5. Window type, partial window title and glob pattern(Ex: * 'frmUnsavedDocument1*') * * 6. Window type, window title and index(If two windows of same * title exist at same time. Ex: * First window name 'dlgAppoinment', Second window name * 'dlgAppoinment1') * * 7. Window type and index(only if window does not have any * accessible title, Ex: 'dlg0') * * \section section4 Window name formats * * If window label contains space or new line characters, they will be * stripped. * * Example * * 1. 'Unsaved Document 1 – gedit', will be represented as * 'UnsavedDocument1-gedit' * * 2. 'Unsaved Document 1 * * gedit', will be represented as 'UnsavedDocument1gedit' * * Refer: * * Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Utils.cs * * \retval 1 on success, 0 otherwise * * \section Example * @code * from ldtp import * * * launchapp('gedit') * * waittillguiexist('*-gedit') * * settextvalue('*-gedit', 'txt1', 'test') * * # Wait for Undo button state enabled * waittillguiexist('*-gedit', 'btnUndo', state = state.ENABLED) * * @endcode * * 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 Alagappan */ /** * \page waittillguinotexist waittillguinotexist * \section Syntax * * waittillguinotexist('\'[, '\'[, guiTimeOut][, \<'state'\>]]) * * \section Description * * 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. * * \section section1 Different window types * * 1. Frame(frm) * * 2. Dialog(dlg) * * 3. Alert(dlg) * * 4. Font Chooser(dlg) * * 5. File Chooser(dlg) * * 6. Window(This type in general does not have any associated * title, so we need to represent them using index - dlg) * * \section section2 Glob Pattern support * * Window name can be clubbed with glob patterns(* or ?) * * \section section3 Different ways of representing window name * * 1. Window type and window title(Ex: * 'frmUnsavedDocument1-gedit') * * 2. Window title(Ex: 'Unsaved Document 1 - gedit') * * 3. Window type, glob expression and partial window title(Ex: * 'frm*-gedit') * * 4. Glob pattern and partial window title(Ex: '*-gedit') * * 5. Window type, partial window title and glob pattern(Ex: * 'frmUnsavedDocument1*') * * 6. Window type, window title and index(If two windows of same * title exist at same time. Ex: * First window name 'dlgAppoinment', Second window name * 'dlgAppoinment1') * * 7. Window type and index(only if window does not have any * accessible title, Ex: 'dlg0') * * \section section4 Window name formats * * If window label contains space or new line characters, they will be * stripped. * * Example * * 1. 'Unsaved Document 1 – gedit', will be represented as * 'UnsavedDocument1-gedit' * * 2. 'Unsaved Document 1 * * gedit', will be represented as 'UnsavedDocument1gedit' * * Refer: * * Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/.cs * * \retval 1 on success, 0 otherwise * * \section Example * * @code * from ldtp import * * * launchapp('gedit') * * waittillguiexist('*-gedit') * * settextvalue('*-gedit', 'txt1', 'test') * * # Wait for Undo button state enabled * waittillguiexist('*-gedit', 'btnUndo', state = state.ENABLED) * * click('*-gedit', 'btnUndo') * * # Wait for Redo button state enabled * waittillguiexist('*-gedit', 'btnRedo', state = state.ENABLED) * # Quit gedit application * selectmenuitem('*-gedit', 'mnuFile;mnuQuit') * # Wait for Gedit window to close * waittillguinotexist('*-gedit') * * @endcode * * 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 Alagappan */ /** * \page log log * \section Syntax * * log('\', logging.\) * * where TYPE can be any of these * * \subsection error * * message will be logged on error * * \subsection critical * * message will be logged on critical * * \section Description * * Logs the message in the log.xml with the tag which can be viewed after the execution of scripts * * \section ImplementationDetails * * The required message will be logged into the log.xml on execution of scripts * * \retval 1 on success and 0 on error * * \section Example * * log('Logging some error string', logging.ERROR) * * log('Logging some critical string', logging.CRITICAL) * * \author Nagashree */ /** * \page ldtplog ldtplog * \section Syntax * * ldtplog('\', '\') * * where tag can be any of these * * \subsection debug * * messages can be logged while executing in debug mode * * \subsection warning * * warning message can be logged * * \subsection teststart * * tag used to indicate the beginning of the test suite * * \subsection testend * * tag used to indicate the end of the test suite * * \subsection begin * * tag used to indicate the beginning of test case * * \subsection end * * tag used at the end of the test case * * \subsection error * * error messages can be logged with this message * * \subsection pass * * message will be logged on successful execution of the testcases * * \subsection 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 end of testcases * * \section Description * * Logs the message in the specified log file in LDTP engine side, with the tag which can be viewed after the execution of scripts * * \section ImplementationDetails * * The required message will be logged into the log.xml on execution of scripts * * \retval 1 on success and 0 on error * * \section Example * * With Respect to Evolution: * * 1) ldtplog('EvolutionSuite', 'begin') * * execfile('evolution.py') * * ldtplog('EvolutionSuite', 'end') * * 2) With respect to Appointment-to check the checkbox, * * In Try Block: * * selecttab('dlgAppointment-NoSummary', 'ptlAppointment-Nosummary', '1') * * ldtplog('Selecttab-In-Appointment', 'pass') * * In except block: * * print "Error" * * ldtplog('Selecttab','fail') * * 3) With respect to creation of vFolders * * ldtplog('Creation-of-vFolders', 'teststart') * * Create_folder() * * ldtplog('Creation-of-vFolders', 'testend') * * 4) Log message showing success of some test case * * from ldtp import * * * You can log the message to start the test case before writing the test case as * * ldtplog('Open a file', 'teststart') * * ldtplog('opening a file', 'pass') * * \author Nagashree */ /** * \page check check * \section Syntax * * check('\', '\') * * \section Description * * Check(tick) the check box state. * * \section ImplementationDetails * * \retval 1 if state is checked, else 0. * * Refer: * * Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Utils.cs * * \section 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 Alagappan * \author Khasim Shaheed */ /** \page uncheck uncheck * \section Syntax * * uncheck('\', '\') * * \section Description * * Uncheck(un-tick) the check state. * * \section ImplementationDetails * * \retval 1 if state is unchecked, else 0. * * Refer: * * Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Utils.cs * * \section Example * * from ldtp 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') * * \author Nagappan Alagappan */ /** \page click click * \section Syntax * * click('\', '\') * * \section Description * * click on radio button / check box / push button/ combo box/ radio menu item/ toggle button/ radio button. * * \section ImplementationDetails * * \subsection Radio 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: * * Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Generic.cs * * \subsection Check 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: * * Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * \subsection Push Push Button * * If push button state is enabled, then click on the object. * * Refer: * * Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * \subsection Toggle Toggle Button * * Click on the toggle button. * * Refer: * * Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * \subsection Combo 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: * * Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py * * \section Examples * * Example for push button(With respect to gedit open dialog) * * 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 Alagappan */ /** \page verifycheck verifycheck * \section Syntax * * verifycheck('\', '\') * * \section Description * * Checks the state of check box * * \retval On check box state is checked returns 1, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Utils.cs * * \section Examples * * from ldtp import * * * For check menu item with respect to gedit menu * * verifycheck('gedit', 'mnuView;mnOutputWindow') * * For check box with respect to gedit preferences * * verifycheck('dlgPreferences', 'cboxEnableAutoIndentation') * * \author Nagappan Alagappan * \author Aishwariya * \author Khasim Shaheed */ /** \page verifyuncheck verifyuncheck * \section Syntax * * verifyuncheck('\', '\') * * \section Description * * Checks the state of check box. * * \retval On check box state is un-checked returns 1, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Utils.cs * * \section 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 Alagappan * \author Khasim Shaheed */ /** \page menuitemenabled menuitemenabled * \section Syntax * * menuitemenabled('\', '\') * * \section Description * * Verify whether a menu is enabled or not * * \retval 1 on success, 0 on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/menu.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/menu.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Menu.cs * * \section Example * * 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. * * menuitemenabled('*-gedit', 'mnuView;mnuToolbar') * * \author Nagappan Alagappan */ /** \page verifymenucheck verifymenucheck * \section Syntax * * verifymenucheck('\', '\') * * \section Description * * Verify whether a menu is checked or not * * \retval 1 on success, 0 on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/menu.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/menu.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Menu.cs * * \section Example * * 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. * * verifymenucheck('*-gedit', 'mnuView;mnuToolbar') * * \author Nagappan Alagappan */ /** \page verifymenuuncheck verifymenuuncheck * \section Syntax * * verifymenuuncheck('\', '\') * * \section Description * * Verify whether a menu is unchecked or checked * * \retval 1 on success, 0 on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/menu.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Menu.cs * * \section Example * * 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. * * verifymenuuncheck('*-gedit', 'mnuView;mnuToolbar') * * \author Nagappan Alagappan */ /** \page menucheck menucheck * \section Syntax * * menucheck('\', '\') * * \section Description * * Checks a menu item, if its already checked it will be silently ignored * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/menu.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Menu.cs * * \section Example * * With respect to gedit, View menu and Toolbar check menuitem, we can check the menuitem. If its already checked, it will be silently ignored. * * menucheck('*-gedit', 'mnuView;mnuToolbar') * * \author Nagappan Alagappan */ /** \page menuuncheck menuuncheck * \section Syntax * * menuuncheck('\', '\') * * \section Description * * Unchecks a menu item, if its already unchecked it will be silently ignored * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/menu.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/menu.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Menu.cs * * \section Example * * With respect to gedit, View menu and Toolbar check menuitem, we can uncheck the menuitem. If its already unchecked, it will be silently ignored. * * menuuncheck('*-gedit', 'mnuView;mnuToolbar') * * \author Nagappan Alagappan */ /** \page setcursorposition setcursorposition * \section Syntax * * setcursorposition('\', '\', \) * * \section Description * * Sets cursor position in a text field * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * \note Only supported on Linux * * \section Example * * from ldtp import * * * # Assuming that gedit is opened * * settextvalue('*-gedit', 'txt0', 'Testing setcursorposition function of LDTP') * * setcursorposition('*-gedit', 'txt0', 9) * * 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. * * \author Nagappan Alagappan */ /** \page istextstateenabled istextstateenabled * \section Syntax * * istextstateenabled('\', '\') * * \section Description * * Checks whether the text object is in editable state or not. * * \retval 1 on success, 0 on failure. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/text.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Text.cs * * \section Example * * \todo * * \author Nagappan Alagappan */ /** \page getstatusbartext getstatusbartext * \section Syntax * * getstatusbartext('\', '\') * * \section Description * * Gets the text displayed in the status bar * * \retval text content displayed in the status bar on success, LdtpExecutionError exception on failure. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * \note Supported only on Linux platform * * \section Example * * \todo * * \author Nagappan Alagappan */ /** \page verifystatusbar verifystatusbar * \section Syntax * * verifystatusbar('\', '\') * * \section Description * * Checks whether the object is status bar or not * * \retval 1 on success, 0 on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * \note Supported only on Linux platform * * \section Example * * With respect to gedit status bar text * * from ldtp import * * * verifystatusbar('*-gedit', 'stat0') * * \author Nagappan Alagappan */ /** \page verifystatusbarvisible verifystatusbarvisible * \section Syntax * * verifystatusbarvisible('\', '\') * * \section Description * * Checks whether the status bar object is visible or not * * \retval 1 on success, 0 on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * \note Supported only on Linux platform * * \section Example * * With respect to gedit status bar text * * from ldtp import * * * verifystatusbarvisible('*-gedit', 'stat0') * * \author Nagappan Alagappan */ /** \page getcursorposition getcursorposition * \section Syntax * * getcursorposition('\', '\') * * \section Description * * Gets the current cursor position of the given text object * * \retval cursor position which is of type long on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * \note Supported only on Linux platform * * \section Example * * from ldtp import * * * # Assuming that gedit is opened * * settextvalue('*-gedit', 'txt0', 'Testing setcursorposition function of LDTP') * * getcursorposition('*-gedit', 'txt0') * * The above example will get the current cursor position in the text object of gedit windows first tab. * * \author Nagappan Alagappan */ /** \page hidelist hidelist * \section Syntax * * hidelist('\', '\') * * \section Description * * 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 * * \section ImplementationDetails * * 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. * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Combobox.cs * * \section Example * * \todo * * \author Poornima */ /** \page comboselect comboselect * \section Syntax * * comboselect('\', '\', '\') * * comboselect('\', '\', '\') * * \section Description * * Select a menu item or list item in a combo box based on name * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Combobox.cs * * \section Example * * In gnome-search-tool combo box 'Available options' to select the menu item 'Contains the text' * * comboselect('SearchForFiles', 'cboAvailableoptions', 'Contains the text') * * \author Poornima */ /** \page selectindex selectindex * \section Syntax * * selectindex('\', '\', \) * * \section Description * * SelectIndex action will select an item from combo box where value of index is pointing to its position in list/menu. * * \section ImplementationDetails * * 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. * * In layered pane, this function call selects the object based on index. * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Combobox.cs * * \section Example * * # Selects the first folder / file in desktop * * selectindex('x-nautilus-desktop', 'Icon View', 0) * * \author Poornima * \author Nagappan Alagappan */ /** \page unselectindex unselectindex * \section Syntax * * unselectindex('\', '\', \) * * \section Description * * In layered pane, this function call unselects the object based on index. * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * \note Supported only on Linux platform * * \section Example * * # Unselects the first folder / file in desktop * * unselectindex('x-nautilus-desktop', 'Icon View', 0) * * \author Nagappan Alagappan */ /** \page unselectitemindex unselectitemindex * \section Syntax * * unselectitemindex('\', '\', \) * * \section Description * * In layered pane, this function call unselects the object based on * the currently selected item index. * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * \note Supported only on Linux platform * * \section Example * * # Unselects the first folder / file in desktop that is already selected * * unselectitemindex('x-nautilus-desktop', 'Icon View', 0) * * \author Nagappan Alagappan */ /** \page selectall selectall * \section Syntax * * selectall('\', '\') * * \section Description * * In layered pane, this function call selects all the object. * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * \note Supported only on Linux platform * * \section Example * * selectall('x-nautilus-desktop', 'Icon View') * * \author Nagappan Alagappan */ /** \page unselectall unselectall * \section Syntax * * unselectall('\', '\') * * \section Description * * In layered pane, this function call unselects all the object. * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * \note Supported only on Linux platform * * \section Example * * unselectall('x-nautilus-desktop', 'Icon View') * * \author Nagappan Alagappan */ /** \page selecteditemcount selecteditemcount * \section Syntax * * selecteditemcount('\', '\') * * \section Description * * In layered pane, this function call returns the selected item count. * * \retval Selected item count on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * \note Supported only on Linux platform * * \section Example * * selecteditemcount('x-nautilus-desktop', 'Icon View') * * \author Nagappan Alagappan */ /** \page ischildselected ischildselected * \section Syntax * * ischildselected('\', '\', '\') * * \section Description * * In layered pane, this function call checks whether the given file / * folder is selected or not. * * \retval Selected item count on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * \note Supported only on Linux platform * * \section Example * * ischildselected('x-nautilus-desktop', 'Icon View', 'file-name.txt') * * \author Nagappan Alagappan */ /** \page ischildindexselected ischildindexselected * \section Syntax * * ischildindexselected('\', '\', \) * * \section Description * * In layered pane, this function call checks whether the given index * is selected or not. * * \retval Selected item count on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * \note Supported only on Linux platform * * \section Example * * ischildindexselected('x-nautilus-desktop', 'Icon View', 0) * * \author Nagappan Alagappan */ /** \page settextvalue settextvalue * \section Syntax * * settextvalue('\', '\', '\') * * \section Description * * puts the text into the component given by the component name * * \section ImplementationDetails * * In text.py * * \retval 1 on success and 0 otherwise * * In combo_box.py * * 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: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Text.cs * * \section Example * * With respect to gnome search tool text field * * settextvalue('SearchforFiles', 'txtNameContainsEntry', 'abcd') * * This is to insert the text 'abcd' into the 'txtNameContainsEntry' field. * * In combo box: * * settextvalue('dlgFind', 'cboSearchfor', 'test') * * \author Poornima */ /** \page appendtext appendtext * \section Syntax * * appendtext('\', '\', '\') * * \section Description * * Appends the given text with already present text * * \section ImplementationDetails * * \retval 1 on success and 0 otherwise * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/text.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Text.cs * * \section 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 */ /** \page activatetext activatetext * \section Syntax * * activatetext('\', '\') * * \section Description * * activates the text box( similar to press enter after setting text) * * \section ImplementationDetails * * \retval 1 on success and 0 otherwise * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * \note Supported only on Linux platform * * \section Example * * With respect to gftp-gtk structure * * activatetext('gFTP', 'txtUser') * * This is to activate the text box 'txtUser' in gftp-gtk * * \author Shagan */ /** \page getcharcount getcharcount * \section Syntax * * getcharcount('\', '\') * * \section Description * * Return the number of characters present in the component identified by the \. * * \section ImplementationDetails * * \retval number of characters * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/text.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Text.cs * * \section Example * * With respect to gedit * * getcharcount('gedit', 'txt0') * * This will return the number of characters in the file presently open. * * \author Premkumar J */ /** \page cuttext cuttext * \section Syntax * * cuttext('\', '\', \, \) * * \section Description * * Cut the text from startindex till the endindex in the component given by the component name * * \section ImplementationDetails * * \retval 1 on success and 0 otherwise * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/text.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Text.cs * * \section 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 */ /** \page copytext copytext * \section Syntax * * copytext('\', '\', \, \) * * \section Description * * Copies text within specified offset present in the specified \ into clipboard * * \section ImplementationDetails * * \retval 1 on success and 0 otherwise * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/text.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Text.cs * * \section Example * * With respect to gedit tool structure * * copytext('gedit', 'txt0', 5,10) * * This is to copy the text within the offset specified from the 'txt0' field into clipboard. * * \author Premkumar J */ /** \page inserttext inserttext * \section Syntax * * inserttext('\', '\', \, '\') * * \section Description * * Insert the text in the specified position in the component given by the component name * * \section ImplementationDetails * * \retval 1 on success and 0 otherwise * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/text.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Text.cs * * \section 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 */ /** \page pastetext pastetext * \section Syntax * * pastetext('\', '\', \) * * \section Description * * paste the text from the position specified in the component given by the component name * * \section ImplementationDetails * * \retval 1 on success and 0 otherwise * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/text.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Text.cs * * \section 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 */ /** \page deletetext deletetext * \section Syntax * * deletetext('\', '\', \, \) * * \section Description * * delete the text from the startindex till the endindex in the component given by the component name * * \section ImplementationDetails * * \retval 1 on success and 0 otherwise * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/text.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Text.cs * * \section 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 */ /** \page showlist showlist * \section Syntax * * showlist('\', '\') * * \section Description * * Displays combo box drop down list in the current dialog. * * \section ImplementationDetails * * 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. * * \retval 1 on success, LdtpExecutionError on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Combobox.cs * * \section Example * * \todo * * \author Poornima */ /** \page verifydropdown verifydropdown * \section Syntax * * verifydropdown('\', '\') * * \section Description * * \retval 1 on success, 0 on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Combobox.cs * * \section Example * * \todo * * \author Poornima */ /** \page verifyhidelist verifyhidelist * \section Syntax * * verfyhidelist('\', '\') * * \section Description * * Verifies if combo box drop down list in the current dialog is not visible. * * \section ImplementationDetails * * 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. * * \retval 1 on success, 0 on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Combobox.cs * * \section Example * * \todo * * \author Poornima */ /** \page verifyshowlist verifyshowlist * \section Syntax * * verifyshowlist('\', '\') * * \section Description * * Verifies if combo box drop down list in the current dialog is visible. * * \section ImplementationDetails * * 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. * * \retval 1 on success, 0 on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Combobox.cs * * \section Example * * \todo * * \author Poornima */ /** \page verifyselect verifyselect * \section Syntax * * verifyselect('\', '\', '\') * * \section Description * * VerfySelect action will verify if combo box is set to value given in argument. * * \section ImplementationDetails * * VerifySelect function will try to find if text box associated with combo box is set to value specified in the argument. * * \retval 1 on success, 0 on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Combobox.cs * * \section Example * * In gnome-search-tool combo box 'Available options' to select the menu item 'Contains the text' * * verifyselect('SearchForFiles', 'cboAvailableoptions', 'Contains the text') * * \author Poornima */ /** \page getcombovalue getcombovalue * \section Syntax * * getcombovalue('\', '\') * * \section Description * * Get currently selected combo box value * * \section ImplementationDetails * * getcombovalue function will try to get the combo box value and returns. * * \retval combo box value on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Combobox.cs * * \section Example * * In gnome-search-tool combo box 'Available options' to get the menu item 'Contains the text' * * getcombovalue('SearchForFiles', 'cboAvailableoptions') * * \author Nagappan Alagappan */ /** \page verifysettext verifysettext * \section Syntax * * verifysettext('\', '\', '\') * * \section Description * * checks if the text is inserted into the component given by the component name * * \section ImplementationDetails * * \retval 1 if the text is inserted into the specified component else returns 0 * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/text.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Text.cs * * \section 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 txtNameContainsEntry field in the gnome search tool * * \author Poornima */ /** \page rightclick rightclick * \section Syntax * * rightclick('\', '\', '\', '[data]') * * \todo icon - rightclick('\', '\') * * \section Description * * Right click on the given object. * * \section ImplementationDetails * * This function gets the coordinate of the given object and the right click event is generated. * * \note If the object's window is not in focus, then this function will fail * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \section Example * * # Right click on an embedded component object type * * rightclick('frmBottomExpandedEdgePanel', 'Volume Control', None) * * \author Thanikachalam S * \author Poornima * \author Premkumar J */ /** \page selectitem selectitem * \section Syntax * * selectitem('\', '\', '\') * * \section Description * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: * Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Combobox.cs * * \section Example * * selectitem('x-nautilus-desktop', 'Icon View', 'file-name.txt') * * \author Thanikachalam S */ /** \page unselectitem unselectitem * \section Syntax * * unselectitem('\', '\', '\') * * \section Description * * Unselect the item that is already selected based on given name * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * \note Supported only on Linux platform * * \section Example * * unselectitem('x-nautilus-desktop', 'Icon View', 'file-name.txt') * * \author Nagappan Alagappan */ /** \page selectmenuitem selectmenuitem * \section Syntax * * selectmenuitem('\', '\') * * \section Description * * Selects the menu item specified. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/menu.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/menu.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Menu.cs * * \section Example * * With respect to gedit menu structure * * selectmenuitem('*-gedit', 'mnuFile;mnuNew') * * \author Nagappan Alagappan * \author Thanikachalam S */ /** \page selecttab selecttab * \section Syntax * * selecttab('\', '\', '\') * * \section Description * * Select the given tab name in the tab list * * \section ImplementationDetails * * \retval 1 if the tab is selected, \exception otherwise LdtpExecutionError will be thrown * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/page_tab_list.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/page_tab_list.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tab.cs * * \section Example * * from ldtp import * * * For selecting Editor tab with respect to gedit preferences * * selecttab('dlgPreferences', 'ptlPreferences', 'Editor') * * \author Thanikachalam S */ /** \page verifytabname verifytabname * \section Syntax * * verifytabname('\', '\', '\') * * \section Description * * Select the given tab name in the tab list * * \section ImplementationDetails * * \retval 1 if the tab is selected, \exception otherwise LdtpExecutionError will be thrown * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/page_tab_list.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/page_tab_list.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tab.cs * * \section Example * * from ldtp import * * * For selecting Editor tab with respect to gedit preferences * * verifytabname('dlgPreferences', 'ptlPreferences', 'Editor') * * \author Nagappan Alagappan */ /** \page selecttabindex selecttabindex * \section Syntax * * selecttabindex('\', '\', \) * * \section Description * * Select a particular tab in the list of tabs * * \section ImplementationDetails * * \retval 1 if the tab is selected, \exception otherwise LdtpExecutionError will be thrown * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/page_tab_list.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/page_tab_list.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tab.cs * * \section Example * * from ldtp import * * * For selecting Editor tab with respect to gedit preferences * * selecttabindex('dlgPreferences', 'ptlPreferences', 1) * * \note 0 based index * * \author Nagappan Alagappan */ /** \page gettabcount gettabcount * \section Syntax * * gettabcount('\', '\') * * \section Description * * Returns the page tab count of a page tab list * * \retval tab count of type long is returned on success, LdtpExecutionError on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/page_tab_list.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/page_tab_list.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tab.cs * * \section Example * * With respect to Preferences dialog of gedit * * from ldtp import * * * selectmenuitem('*-gedit', 'mnuEdit;mnuPreferences') * * gettabcount('dlgPreferences', 'ptl0') * * \author Nagappan Alagappan */ /** \page gettabname gettabname * \section Syntax * * gettabname('\', '\', \) * * \section Description * * Returns the page tab name of the given index in a page tab list * * \retval tab name is returned on success, LdtpExecutionError on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/page_tab_list.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/page_tab_list.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tab.cs * * \section Example * * With respect to Preferences dialog of gedit * * from ldtp import * * * selectmenuitem('*-gedit', 'mnuEdit;mnuPreferences') * * gettabname('dlgPreferences', 'ptl0', 0) * * \author Nagappan Alagappan */ /** \page verifypushbutton verifypushbutton * \section Syntax * * verifypushbutton('\', '\') * * \section Description * * Verify whether the given object is push button or not. * * \section ImplementationDetails * * \retval 1 if object is push button, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * \note Supported only on Linux platform * * \section Example * * With respect to gedit open dialog window, verify open button is push button or not. * * verifypushbutton('dlgOpenFile', 'btnOpen') * * \author Nagappan Alagappan */ /** \page stateenabled stateenabled * \section Syntax * * stateenabled('\', '\') * * \section Description * * Checks the radio button object state enabled or not * * \section ImplementationDetails * * \retval 1 if state is enabled, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Generic.cs * * \section Example * * Push button: With respect to gedit Open dialog, this function checks open button state enabled or not * * stateenabled('dlgOpenFile', 'btnOpen') * * Radio button: With respect to gedit Print dialog, this function cheks the 'All' radio button state is enabled or not * * stateenabled('Print', 'All') * * Check box: With respect to gedit Print dialog, this function cheks the 'Reverse' check box state is enabled or not * * stateenabled('Print', 'Reverse') * * \author Nagappan Alagappan */ /** \page setvalue setvalue * \section Syntax * * setvalue('\', '\', \) * * \section Description * * Sets the value of the spin button. * * \section ImplementationDetails * * \retval 1 on success, else LdtpExecutionError exception * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \section Example * * Creation of Appointment in Evolution: * * setvalue('dlgAppointment-Nosummary','sbtnOccurence',2) * * \author Thanikachalam S */ /** \page getvalue getvalue * \section Syntax * * getvalue('\', '\') * * \section Description * * Gets the value in the spin button. * * \section ImplementationDetails * * \retval value in the spin button on success, else LdtpExecutionError exception * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \section Example * * Creation of Appointment in Evolution: * * getvalue('dlgAppointment-Nosummary', 'sbtnOccurence') * * \author Thanikachalam S */ /** \page getmaxvalue getmaxvalue * \section Syntax * * getmaxvalue('\', '\') * * \section Description * * Gets the max value of the spin button. * * \section ImplementationDetails * * \retval max value of the spin button on success, else LdtpExecutionError exception * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \section Example * * Creation of Appointment in Evolution: * * getmaxvalue('dlgAppointment-Nosummary', 'sbtnOccurence') * * \author Nagappan Alagappan */ /** \page getmax getmax * \section Syntax * * getmax('\', '\') * * \section Description * * Gets the max value of the spin button. * * \section ImplementationDetails * * \retval max value of the spin button on success, else LdtpExecutionError exception * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \section Example * * Creation of Appointment in Evolution: * * getmax('dlgAppointment-Nosummary', 'sbtnOccurence') * * \author Nagappan Alagappan */ /** \page getminvalue getminvalue * \section Syntax * * getminvalue('\', '\') * * \section Description * * Gets the min value of the spin button. * * \section ImplementationDetails * * \retval min value of the spin button on success, else LdtpExecutionError exception * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \section Example * * Creation of Appointment in Evolution: * * getminvalue('dlgAppointment-Nosummary', 'sbtnOccurence') * * \author Nagappan Alagappan */ /** \page getmin getmin * \section Syntax * * getmin('\', '\') * * \section Description * * Gets the min value of the spin button. * * \section ImplementationDetails * * \retval min value of the spin button on success, else LdtpExecutionError exception * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \section Example * * Creation of Appointment in Evolution: * * getmin('dlgAppointment-Nosummary', 'sbtnOccurence') * * \author Nagappan Alagappan */ /** \page getminincrement getminincrement * \section Syntax * * getminincrement('\', '\') * * \section Description * * Gets the min value of the spin button. * * \section ImplementationDetails * * \retval min value of the spin button on success, else LdtpExecutionError exception * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \section Example * * Creation of Appointment in Evolution: * * getminincrement('dlgAppointment-Nosummary', 'sbtnOccurence') * * \author Nagappan Alagappan */ /** \page verifysetvalue verifysetvalue * \section Syntax * * verifysetvalue('\', '\', '\') * * \section Description * * Verifies the value set in spin button. * * \section ImplementationDetails * * \retval 1 on success and 0 on error. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \note Supported only on Linux and Windows platform * * \section Example * * In the Creation of Appointment: * * verifysetvalue('dlgAppointment-Nosummary','sbtnOccurence','2') * * \author Sheetal */ /** \page multiselect multiselect * \section Syntax * * multiselect('\', '\', ['\',]) * * \section Description * * 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, check for partial match if set to true, default is false. * * \section ImplementationDetails * * \retval 1 on success and 0 on error. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \section Example * * from ldtp import * * * With respect to gedit open dialog * * multiselect('Open Files', 'tblFiles', ['monox.sh', 'rsync.sh']) * * \author Nagappan Alagappan */ /** \page multiremove multiremove * \section Syntax * * multiremove('\', '\
', ['\',]) * * \section Description * * Unselects the row in table whose first column's(0th column) value is same as the contents of the third argument in the function call, check for partial match if set to true, default is false. * * \section ImplementationDetails * * \retval 1 on success and 0 on error. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \section Example * * from ldtp import * * * With respect to gedit open dialog * * multiremove('Open Files', 'tblFiles', ['monox.sh', 'rsync.sh']) * * \author Nagappan Alagappan */ /** \page selectrow selectrow * \section Syntax * * selectrow('\', '\
', '\') * * \section Description * * 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, check for partial match if set to true, default is false. * * \section ImplementationDetails * * \retval 1 on success and 0 on error. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \section Example * * from ldtp import * * * With respect to gedit open dialog * * selectrow('dlgOpen', 'dlgFiles', 'readme') * * \author Nagappan Alagappan */ /** \page selectrowindex selectrowindex * \section Syntax * * selectrowindex('\', '\
', \) * * \section Description * * Selects the row with the given index value in table. Index value starts from 0. * * \section ImplementationDetails * * \retval 1 on success and 0 on error. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \section Example * * from ldtp import * * * With respect to gedit open dialog * * selectrowindex('dlgOpen', 'dlgFiles', 0) * * \author Nagappan Alagappan */ /** \page selectrowpartialmatch selectrowpartialmatch * \section Syntax * * selectrowpartialmatch('\', '\', '\') * * \section Description * * selects the row having cell that contains the given text. * * \section ImplementationDetails * * \retval 1 on success and throws an exception on error * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \section Example * * With respect to evolution * * selectrowpartialmatch('evolution', 'ttblMailFolder','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 */ /** \page verifytoggled verifytoggled * \section Syntax * * verifytoggled('', 'component name\>') * * \section Description * * Verify whether the toggle button is toggled or not * * \retval 1 on success, else 0 * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * \note supported only on Linux platform * * \section Example * * 1. With respect to GTK File Selector - Open dialog in gedit application * * from ldtp import * * * 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 * * 2. With respect to GTK File Selector in gedit * * from ldtp import * * * click('*-gedit', 'btnOpen') * * verifytoggled('dlgOpenFile...', 'tbtnTypeafilename') * * \author Poornima Nayak * \author Premkumar J */ /** \page onedown onedown * \section Syntax * * onedown('\', '\', \) * * \section Description * * Move the scroll bar down 'n' times, where 'n' is the number of iterations specified in the argument field. * * \section ImplementationDetails * * Scrolls down if value does not exceed the maximum limit, else fails. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \section Example * * from ldtp import * * * For scroll bar item with respect to gedit * * onedown('gedit', 'scrollBar', 3) * * \author Aishwariya & Kamakshi */ /** \page oneleft oneleft * \section Syntax * * oneleft('\', '\', \) * * \section Description * * Move the(horizontal) scroll bar left 'n' times, where 'n' is the number of iterations specified in the argument field. * * \section ImplementationDetails * * Scrolls left if value does not drop below the minimum limit, else fails. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \section Example * * from ldtp import * * * For scroll bar item with respect to gedit * * oneleft('gedit', 'scrollBar', 3) * * \author Aishwariya & Kamakshi */ /** \page oneright oneright * \section Syntax * * oneright('\', '\', \) * * \section Description * * Move the(horizontal) scroll bar right 'n' times, where 'n' is the number of iterations specified in the argument field. * * \section ImplementationDetails * * Scrolls right if value does not exceed the maximum limit, else fails. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \section Example * * from ldtp import * * * For scroll bar item with respect to gedit * * oneright('gedit', 'scrollBar', 3) * * \author Aishwariya & Kamakshi */ /** \page oneup oneup * \section Syntax * * oneup('\', '\', \) * * \section Description * * Move the(vertical) scroll bar up 'n' times, where 'n' is the number of iterations specified in the argument field. * * \section ImplementationDetails * * Scrolls up if value does not drop below the minimum limit, else fails. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \section Example * * from ldtp import * * * For scroll bar item with respect to gedit * * oneup('gedit', 'scrollBar', 3) * * \author Aishwariya & Kamakshi */ /** \page scrolldown scrolldown * \section Syntax * * scrolldown('\', '\') * * \section Description * * Move the(vertical) scroll bar to the bottom. * * \section ImplementationDetails * * \retval 1 if action is performed, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Scrollbar.cs * * \section Example * * from ldtp import * * * For scroll bar item with respect to gedit * * scrolldown('gedit', 'scrollBar') * * \author Aishwariya & Kamakshi */ /** \page scrollleft scrollleft * \section Syntax * * scrolleft('\', '\') * * \section Description * * Move the(horizontal) scroll bar to the extreme left. * * \section ImplementationDetails * * \retval 1 if action is performed, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Scrollbar.cs * * \section Example * * from ldtp import * * * For scroll bar item with respect to gedit * * scrolleft('gedit', 'scrollBar') * * \author Aishwariya & Kamakshi */ /** \page scrollright scrollright * \section Syntax * * scrollright('\', '\') * * \section Description * * Move the(horizontal) scroll bar to the extreme right. * * \section ImplementationDetails * * \retval 1 if action is performed, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Scrollbar.cs * * \section Example * * from ldtp import * * * For scroll bar item with respect to gedit * * scrollright('gedit', 'scrollBar') * * \author Aishwariya & Kamakshi */ /** \page scrollup scrollup * \section Syntax * * scrollup('\', '\') * * \section Description * * Move the(vertical) scroll bar to the extreme top. * * \section ImplementationDetails * * \retval 1 if action is performed, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Scrollbar.cs * * \section Example * * from ldtp import * * * For scroll bar item with respect to gedit * * scrollup('gedit', 'scrollBar') * * \author Aishwariya & Kamakshi */ /** \page setmax setmax * \section Syntax * * setmax('\', '\') * * \section Description * * Set the slider to the maximum value. * * \section ImplementationDetails * * \retval 1 if action is performed, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \section Example * * from ldtp import * * * For slider component with respect to gnome-terminal * * setmax('dlgEditingProfile"Default"', 'slider') * * \author Aishwariya & Kamakshi */ /** \page setmin setmin * \section Syntax * * setmin('\', '\') * * \section Description * * Set the slider to the minimum value. * * \section ImplementationDetails * * \retval 1 if action is performed, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \section Example * * from ldtp import * * * For slider component with respect to gnome-terminal * * setmin('dlgEditingProfile"Default"', 'slider') * * \author Aishwariya & Kamakshi */ /** \page getslidervalue getslidervalue * \section Syntax * * getslidervalue('\', '\') * * \section Description * * Returns the slider value of the given object. Volume controller of type slider * * \retval slider value of type float is returned on success, LdtpExecutionError on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \note Supported only on Linux and Windows platform * * \section Example * * \todo * * \author Aishwariya & Kamakshi */ /** \page increase increase * \section Syntax * * increase('\', '\', \) * * \section Description * * Increase the value of the slider 'n' times, where 'n' is the number of iterations specified in the argument field. * * \section ImplementationDetails * * Increases the value if it does not exceed the maximum limit, else fails. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \section Example * * from ldtp import * * For slider component with respect to gnome-terminal * * increase('dlgEditingProfile"Default"', 'slider', 3) * * \author Aishwariya & Kamakshi */ /** \page decrease decrease * \section Syntax * * decrease('\', '\', \) * * \section Description * * Decrease the value of the slider 'n' times, where 'n' is the number of iterations specified in the argument field. * * \section ImplementationDetails * * Decreases the value if it does not fall below the minimum limit, else fails. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \section Example * * from ldtp import * * * For slider component with respect to gnome-terminal * * decrease('dlgEditingProfile"Default"', 'slider', 3) * * \author Aishwariya & Kamakshi */ /** \page selectpanel selectpanel * \section Syntax * * selectpanel('\', '\', \) * * \section Description * * Select a panel using the panel number in a list of panels * * \section ImplementationDetails * * \retval 1 on success and 0 on error * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * \note Supported only on Linux platform * * \section Example * * from ldtp import * * * With respect to Evolution Contacts * * selectpanel('frmEvolution-Contacts', 'pnlAddbook', 1) * * \author Poornima Nayak */ /** \page verifytablecell verifytablecell * \section Syntax * * verifytablecell('\', '\
', \, \, '\') * * \section Description * * Verifies the tablecell value with the String Passed ie., fifth argument * * \section ImplementationDetails * * \retval 1 on success and 0 on error. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * \note Supported only on Linux and Mac platform * * \section Example * * from ldtp import * * * With respect to Evolution, open message * * verifytablecell('frmReadOnlyMail', 'tblcheck', 1, 1, 'xyz\@yahoo.com') * * \author Bhargavi */ /** \page handletablecell handletablecell * \section Syntax * * handletablecell() * * \section Description * * Handle table cell, by default handling table cell is turned off, as the mapping (atleast with Evolution) consumes lot of time * * \section ImplementationDetails * * \retval 1 on success and 0 on error. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * \note Supported only on Linux and Mac platform * * \section Example * * from ldtp import * * * With respect to Evolution, open message * * handletablecell() * * verifytablecell('frmReadOnlyMail', 'tblcheck', 1, 1, 'xyz\@yahoo.com') * * \author Nagappan Alagappan */ /** \page unhandletablecell unhandletablecell * \section Syntax * * unhandletablecell() * * \section Description * * Don't handle table cell, by default handling table cell is turned off, as the mapping (atleast with Evolution) consumes lot of time * * \section ImplementationDetails * * \retval 1 on success and 0 on error. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * \note Supported only on Linux and Mac platform * * \section Example * * from ldtp import * * * With respect to Evolution, open message * * handletablecell() * * verifytablecell('frmReadOnlyMail', 'tblcheck', 1, 1, 'xyz\@yahoo.com') * * unhandletablecell() * * \author Nagappan Alagappan */ /** \page setcellvalue setcellvalue * \section Syntax * * setcellvalue('', '
', [, [, '']]) * * \section Description * * Set a text in a cell or toggle a cell * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \section Example * * With respect to gedit 2.30.2 Preferences dialog, Plugins tab * * To toggle a plugin * * setcellvalue('gedit Preferences', 'tblActivePlugins', 0) * * With respect to Evolution 2.28.3, Tasks in Calendar view * * To change existing task name * * Note: Evolution doesn't provide an option through accessibility way to add Tasks in Calendar view, to work around use File->New->Tasks to add a New Task * * The following example works only with existing task ! * * setcellvalue('Calendars - Evolution', 'tblTasks', 0, 2, 'Hello') * * \author Nagappan Alagappan */ /** \page selectlastrow selectlastrow * \section Syntax * * selectlastrow('\', '\
') * * \section Description * * Selects the last row of a table. * * \retval 1 on success, 0 otherwise. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \section Example * * from ldtp import * * * With respect to Contact List Members dialog of Contact List Editor * * selectlastrow('dlgContactListMembers', 'tblContacts') * * \author Nagappan Alagappan */ /** \page doesrowexist doesrowexist * \section Syntax * * doesrowexist('\', '\
', '\'[, \]) * * \section 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, if partial match is set to False. * * \section ImplementationDetails * * \retval 1 if there are rows with the given string in any of its cell, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \section 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 subject') * * doesrowexist('dlgContactListMembers', 'tblContacts', 'Sample', True) * * \author Manu */ /** \page checkrow checkrow * \section Syntax * * checkrow('\', '\
', \[, \]) * * \section 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. * * \section ImplementationDetails * * \retval 1 on success, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * \note Supported only on Linux platform * * \section Example * * from ldtp import * * * With respect to Categories in Appointment in Evolution * * checkrow('dlgCategories','tblcategories',3) * * \author Bhargavi */ /** \page verifycheckrow verifycheckrow * \section Syntax * * verifycheckrow('\', '\
', \[, \]) * * \section Description * * \section ImplementationDetails * * \retval 1 on success, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * \note Supported only on Linux platform * * \section Example * * from ldtp import * * * With respect to Categories in Appointment in Evolution * * verifycheckrow('dlgCategories', 'tblcategories', 3) * * \author Bhargavi */ /** \page uncheckrow uncheckrow * \section Syntax * * uncheckrow('\', '\
', \[, \]) * * \section 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. * * \section ImplementationDetails * * \retval 1 on success, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * \note Supported only on Linux platform * * \section Example * * from ldtp import * * * With respect to Categories in Appointment in Evolution * * uncheckrow('dlgCategories','tblcategories',3) * * \author Bhargavi */ /** \page verifyuncheckrow verifyuncheckrow * \section Syntax * * verifyuncheckrow('\', '\
', \[, \]) * * \section Description * * \section ImplementationDetails * * \retval 1 on success, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * \note Supported only on Linux platform * * \section Example * * from ldtp import * * * With respect to Categories in Appointment in Evolution * * verifyuncheckrow('dlgCategories', 'tblcategories', 3) * * \author Bhargavi */ /** \page verifypartialmatch verifypartialmatch * \section Syntax * * verifypartialmatch('\', '\' , '\' ) * * \section Description * * Verifies the textbox with the partial string * * \section ImplementationDetails * * \retval 1 on success, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/text.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Text.cs * * \section Example * * from ldtp import * * * With respect to Evolution, to verify textbox with partial string * * verifypartialmatch('frmComposeamessage', 'txtto','nove') * * \author Bhargavi */ /** \page getrowcount getrowcount * \section Syntax * * getrowcount('\', '\
') * * \section Description * * Returns the number of rows present in the table mentioned * * \retval number of rows present in the table on success, else -1 * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \section Example * * from ldtp import * * * With respect to Evolution, to check no of mails * * getrowcount('frmReadOnlyMail', 'tblmails') * * \author Bhargavi */ /** \page verifypartialtablecell verifypartialtablecell * \section Syntax * * verifypartialtablecell('\', '\
', \, \, '\') * * \section Description * * Verifies the tablecell value with the sub String Passed ie., fifth argument * * \section ImplementationDetails * * \retval 1 on success, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * \note Supported only on Mac and Linux platform * * \section Example * * from ldtp import * * * With respect to Evolution, open message * * verifypartialtablecell('frmReadOnlyMail', 'tblcheck', 1, 1, 'xyz') * * \author Bhargavi */ /** \page grabfocus grabfocus * \section Syntax * * grabfocus('\'[, '\']) * * \section Description * * gives focus to the specified context or component, in case of a text box the cursor is placed in it. * * \section ImplementationDetails * * \retval 1 on success, else LdtpExecutionError exception * * \section Example * * With respect to gnome search tool structure * * settextvalue('SearchforFiles', 'txtNameContainsEntry') * * This places the cursor in the 'txtNameContainsEntry' field. * */ /** \page selectpanelname selectpanelname * \section Syntax * * selectpanelname('\', '\', '\') * * \section Description * * Select a panel using the panel name in a list of panels * * \section ImplementationDetails * * \retval 1 on success, else LdtpExecutionError exception * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Generic.cs * * \section Example * * from ldtp import * * * With respect to Evolution Contacts * * selectpanelname('Evolution-Contacts', 'pnlAddbook', 'ldtp') * * \author Khasim Shaheed */ /** \page expandtablecell expandtablecell * \section Syntax * * expandtablecell('', '', ) * * \section Description * * Expand or contract the tree table cell on a row * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \note Supported only on Linux and Windows platform * * \section Example * * With respect to Evolution Mail component * * from ldtp import * * * expandtablecell('frm*-Evolution', 'ttblMailFolderTree', 0) # In mail folder view * * \author */ /** \page gettablerowindex gettablerowindex * \section Syntax * * gettablerowindex('\', '\', '\') * * \section Description * * Returns the id of the row containing the given \ * * \section ImplementationDetails * * \retval Return id of the row containing the given cell value, if it is found else return -1 * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \section Example * * In case of Evolution Calendar, to select the category form the list of categories * * gettablerowindex('dlgMeeting', 'tblCategoryList', 'Business') * * The above call would return the row id of the cell containing Business. * * \author Premkumar J */ /** \page comboselectindex comboselectindex * \section Syntax * * comboselectindex('\', '\', \) * * \section Description * * In combo box, select the list value based on index. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Combobox.cs * * \section Example * * selectindex('x-nautilus-desktop', 'Icon View', 0) * * \author Nagappan Alagappan */ /** \page verifyvisiblebuttoncount verifyvisiblebuttoncount * \section Syntax * * verifyvisiblebuttoncount('', '', ) * * \section Description * * Verifies whether the toolbar button count matches with the argument count. 1 based index. * * \retval 1 on success, else 0 * * \section Example * * With respect to gedit application toolbar * * from ldtp import * * * verifyvisiblebuttoncount('*-gedit', 'tbar0', 12) # Gedit 2.12 default without any plugin * * \author J Premkumar */ /** \page verifybuttoncount verifybuttoncount * \section Syntax * * verifybuttoncount('', '', ) * * \section Description * * Verifies whether the toolbar button count matches with the argument count. 1 based index. * * \retval 1 on success, else 0 * * \section Example * * With respect to gedit application toolbar * * from ldtp import * * * verifybuttoncount('*-gedit', 'tbar0', 12) # Gedit 2.12 default without any plugin * * \author J Premkumar */ /** \page gettextvalue gettextvalue * \section Syntax * * gettextvalue('\', '\', \, \) * * \section Description * * returns the text within the given range in the component given by the component name. \ and \ are optional. If they are ommited, the entire text is returned. * * \retval text data of string type on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/text.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Text.cs * * \section 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 starting from the fifth character. * * gettextvalue('SearchforFiles', 'txtNameContainsEntry', 5, 10) * * The above statement will return the text present in 'txtNameContainsEntry' field starting from the fifth character * * till the tenth character. * * \author Premkumar J */ /** \page getcellvalue getcellvalue * \section Syntax * * getcellvalue('\', '\', '\'[, '\']) * * \section Description * * returns the text in a cell at given row and column of a table / tree table * * \retval cell value of type string on success, else LdtpExecutionError exception * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \section Example * * With respect to Evolution Messages tree table * * getcellvalue('Evolution-Mail', 'treetblMails', 2, 4) * * This will return the subject of 3rd message in the message list. * * \author Khasim Shaheed * \author Premkumar J */ /** \page getcellsize getcellsize * \section Syntax * * getcellsize('\', '\', '\'[, '\']) * * \section Description * * returns the coordinates of the cell at given row and column of a table / tree table * * \retval cell size of list (x, y, width, height) on success, else LdtpExecutionError exception * * \section Example * * With respect to Evolution Messages tree table * * getcellvalue('Evolution-Mail', 'treetblMails', 2, 4) * * This will return the size of 3rd message in the message list. * * \author Nagappan Alagappan */ /** \page getallitem getallitem * \section Syntax * * getallitem('\', '\') * * \section Description * * Get all the list of contents of a combox box as a string list. * * \retval list of type string on success, LdtpExecutionError on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Combobox.cs * * \section Example * * With respect to Replace dialog of gedit application * * from ldtp import * * * # Without specifiying the filename * * getallitem('dlgFind', 'cboSearchfor') * * \author Nagappan Alagappan */ /** \page remap remap * \section Syntax * * remap('\') * * \section 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 should be same as the one given as the commmand-line argument for appmap generation. * * \section ImplementationDetails * * 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 * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Core.cs * * \section Example * * remap('dlggeditPreferences') # Remaps the complete gedit preferences dialog * * \author Premkumar J */ /** \page getwindowlist getwindowlist * \section Syntax * * getwindowlist() * * \section Description * * Gets all the window name, that are currently opened. If none of the windows are opened, then LdtpExecutionError will be thrown. * * \retval list of window names will be returned on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Generic.cs * * \section Example * * from ldtp import * * * getwindowlist() * * \author Premkumar J */ /** \page getwindowsize getwindowsize * \section Syntax * * getwindowsize('\') * * \section Description * * Get the window size, of the given window name. If window does not exist, then LdtpExecutionError will be thrown. * * \retval x, y, width, height as a list and as int type will be returned on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Generic.cs * * \section Example * * launchapp('gedit') * * getwindowsize('*-gedit') * * \author Nagappan Alagappan */ /** \page getobjectsize getobjectsize * \section Syntax * * getobjectsize('\'[, '\']) * * \section Description * * Get the object size, of the given window. If object does not exist, then LdtpExecutionError will be thrown. * * \retval x, y, width, height as a list and as int type will be returned on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Generic.cs * * \section Example * * launchapp('gedit') * * getobjectsize('*-gedit', 'btnFind') * * \author Nagappan Alagappan */ /** \page getapplist getapplist * \section Syntax * * getapplist() * * \section Description * * Will return all the accessibility application window title that are currently opened * * \retval list of window names will be returned on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Generic.cs * * \section Example * * from ldtp import * * * getapplist() # Will return all the accessibility application window title that are currently opened * * \author Nagappan Alagappan */ /** \page getaccesskey getaccesskey * \section Syntax * * getaccesskey('\'[, '\']) * * \section Description * * Will return access key, if available * * \retval String with access key on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Generic.cs * * \section Example * * from ldtp import * * * # Print access key of OK button in Preferences window * print getaccesskey("Preferences", "btnOK") * * \author Nagappan Alagappan */ /** \page getallstates getallstates * \section Syntax * * getallstates('\'[, '\']) * * \section Description * * Will return all the accessibility states of given object information * * \retval list of states will be returned on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Generic.cs * * \section Example * * from ldtp import * * * getallstates() # Will return all the accessibility states of given * object information * Compare all the states based on your requirement, say for example, * if interested in checking for VISIBLE state, then: * * states = getallstates('*-gedit', 'btnCopy') * if state.VISIBLE in states: * print 'Object is visible' * * \author Nagappan Alagappan */ /** \page getchild getchild * \section Syntax * * getchild('\'<[, '\'], [ '\']>) * * \section Description * * Gets the list of object available in the window, which matches * component name or role name or both. * * \retval List of objects on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Generic.cs * * \section Example * * With respect to Find object of gedit application * * from ldtp import * * * getchild('*-gedit', 'Find') * * getchild('*-gedit', role = 'push button') * * getchild('*-gedit', 'Find', role = 'push button') * * \author Nagappan Alagappan */ /** \page getobjectlist getobjectlist * \section Syntax * * getobjectlist('\') * * \section Description * * Gets the list of object available in the window(if window exist, else exception will be thrown) * * \retval List of objects on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Generic.cs * * \section Example * * With respect to Find dialog of gedit application * * from ldtp import * * * getobjectlist('dlgFind') * * \author Premkumar J */ /** \page getobjectinfo getobjectinfo * \section Syntax * * getobjectinfo('\', '\') * * \section Description * * Gets the list of object information lik class, parent, label, label_by, child_index * * \retval list of object properies(example, class, parent, label, label_by, child_index) on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Generic.cs * * \section Example * * With respect to gedit Find dialog * * from ldtp import * * * getobjectinfo('dlgFind', 'btnFind') * * \author */ /** \page getobjectproperty getobjectproperty * \section Syntax * * getobjectproperty('', '', '\') * * \section Description * * Get the object property if available, else exception will be thrown * * \retval object property string on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Generic.cs * * \section Example * * With respect to find dialog of gedit application * * from ldtp import * * * getobjectproperty('dlgFind', 'btnFind', 'label') # Returns '_Find' string in US.English locale * * \author Premkumar J */ /** \page doubleclickrow doubleclickrow * \section Syntax * * doubleclickrow('\', '\
', '\') * * \section Description * * 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. * * \retval 1 on success, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \section Example * * \todo * * \author Premkumar J */ /** \page doubleclickrowindex doubleclickrowindex * \section Syntax * * doubleclickrowindex('\', '\
', \) * * \section Description * * 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. * * \retval 1 on success, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \section Example * * \todo * * \author Nagappan Alagappan */ /** \page singleclickrow singleclickrow * \section Syntax * * singleclickrow('\', '\
', '\') * * \section Description * * 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. * * \retval 1 on success, else 0. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/table.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/table.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Tree.cs * * \section Example * * \todo * * \author Premkumar J */ /** \page doubleclick doubleclick * \section Syntax * * doubleclick('\', '\') * * \section Description * * 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. * * \retval 1 on success, else 0 * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/mouse.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/mouse.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Mouse.cs * * \section Example * * doubleclick(u'frm%s' % os.getenv('LOGNAME'), 'icoDesktop') * * \author Premkumar J */ /** \page listsubmenus listsubmenus * \section Syntax * * listsubmenus('window name\>', 'menu name\>') * * \section Description * * Get the list of sub menu item, in a menu as a list * * \retval list of menuitems as string on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/menu.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/menu.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Menu.cs * * \section Example * * With respect to gedit application, File menu * * from ldtp import * * * listsubmenus('*-gedit', 'mnuFile') # all the submenus of File menu as a list of string * * \author Nagappan Alagappan */ /** \page invokemenu invokemenu * \section Syntax * * invokemenu('window name\>', 'object name\>') * * \section Description * * Invokes the menu in an embedded component(accessible) type * * \retval 1 on success, LdtpExecutionError exception on failure * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/menu.py * * \section Example * * With respect to gedit application, File menu * * from ldtp import * * * invokemenu('frmBottomExpandedEdgePanel', 'Volume Control') * * \note Supported only on Linux * * \author Nagappan Alagappan */ /** \page verifyscrollbar verifyscrollbar * \section Syntax * * verifyscrollbar('', '') * * \section Description * * Checks whether the given object is scrollbar or not, also we can check whether scroll bar object is available or not * * \retval 1 on success, else 0 * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Scrollbar.cs * * \section Example * * With respect to gedit application * * from ldtp import * * * 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 * * \author Nagappan Alagappan */ /** \page verifyscrollbarhorizontal verifyscrollbarhorizontal * \section Syntax * * verifyscrollbarhorizontal('', '') * * \section Description * * Checks whether the given object is horizontal scrollbar or not * * \retval 1 on success, else 0 * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * \note Supported only on Linux and Mac * * \section Example * * With respect to gedit application * * from ldtp import * * 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 * * \author Nagappan Alagappan */ /** \page verifyscrollbarvertical verifyscrollbarvertical * \section Syntax * * verifyscrollbarvertical('', '') * * \section Description * * Checks whether the given object is vertical scrollbar or not * * \retval 1 on success, else 0 * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/value.py * * \note Supported only on Linux and Mac * * \section Example * * With respect to gedit application * * from ldtp import * * 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 * * \author Nagappan Alagappan */ /** \page verifyslider verifyslider * \section Syntax * * verifyslider('', '') * * \section Description * * \retval 1 on success, else 0 * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \note Support only on Linux and Mac * * \section Example * * \todo * * \author Nagappan Alagappan */ /** \page verifysliderhorizontal verifysliderhorizontal * \section Syntax * * verifysliderhorizontal('', '') * * \section Description * * \retval 1 on success, else 0 * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Value.cs * * \note Support only on Linux and Mac * * \section Example * * \todo * * \author Nagappan Alagappan */ /** \page verifyslidervertical verifyslidervertical * \section Syntax * * verifyslidervertical('', '') * * \section Description * * \retval 1 on success, else 0 * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/value.py * * \note Supported only on Linux * * \section Example * * \todo * * \author Nagappan Alagappan */ /** \page onwindowcreate onwindowcreate * \section Syntax * * onwindowcreate('', ''[, * ]) * * \section Description * * Watch, window create event, with the given title and call the respective callback function. Window title supports regular expression too. * * \retval 1 on success, else LdtpExecutionError exception * * Refer: * * Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/WindowList.cs * * \note Supported only on Linux and Windows * * \section Example * * With respect to gedit application, replace dialog * * @code * * from ldtp import * * import threading * * launchapp('gedit') * waittillguiexist('*-gedit') * * callbackRunning = threading.Event() * callbackRunning.clear() * callbackState = threading.Event() * callbackState.clear() * * def cb(): * callbackState.set() * waittillguiexist('dlgReplace') * click('dlgReplace', 'btnClose') * callbackState.clear() * callbackRunning.set() * print 'callbackend' * * def cbwithvarargs(*args): * for arg in args: * print arg * print 'callbackend' * * onwindowcreate('dlgReplace', cb) * onwindowcreate('dlgOpenFiles', cbwithvarargs, 'test', 'var', 'args') * * click('*gedit', 'btnReplace') * click('*gedit', 'btnOpen') * * waittillguiexist('dlgOpenFiles') * click('dlgOpenFiles', 'btnCancel') * * if callbackState.isSet(): * print 'Waiting for callback to complete' * callbackRunning.wait() * print 'callbackset' * * print 'test end' * * @endcode * * \author Nagappan Alagappan */ /** \page removecallback removecallback * \section Syntax * * removecallback('') * * \section Description * * Remove the callback function that was registered with onwindowcreate * * \retval 1 on success, else LdtpExecutionError exception * * Refer: * Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/WindowList.cs * * \note Supported only on Linux and Windows * * \section Example * * With respect to gedit application, replace dialog * * @code * * from ldtp import * * import threading * * launchapp('gedit') * waittillguiexist('*-gedit') * * callbackRunning = threading.Event() * callbackRunning.clear() * callbackState = threading.Event() * callbackState.clear() * * def cb(): * callbackState.set() * waittillguiexist('dlgReplace') * click('dlgReplace', 'btnClose') * callbackState.clear() * callbackRunning.set() * print 'callbackend' * * def cbwithvarargs(*args): * for arg in args: * print arg * print 'callbackend' * * onwindowcreate('dlgReplace', cb) * onwindowcreate('dlgOpenFiles', cbwithvarargs, 'test', 'var', 'args') * * click('*gedit', 'btnReplace') * click('*gedit', 'btnOpen') * * waittillguiexist('dlgOpenFiles') * click('dlgOpenFiles', 'btnCancel') * * if callbackState.isSet(): * print 'Waiting for callback to complete' * callbackRunning.wait() * print 'callbackset' * * print 'test end' * * removecallback('dlgReplace') * removecallback('dlgOpenFiles') * * @endcode * * \author Nagappan Alagappan */ /** \page doesmenuitemexist doesmenuitemexist * \section Syntax * * doesmenuitemexist('\', '\') * * \section Description * * checks if the specified menuitem specified in the menu hierarchy is present or not * * \section ImplementationDetails * * \retval 1 if the menuitem is present, else 0 * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/menu.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/menu.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Menu.cs * * \section Example * * With respect to gedit menu structure * * doesselectmenuitem('gedit', '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 J Premkumar */ /** \page startlog startlog * \section Syntax * * startlog('\', [[0 or 1]]) * * second argument is optional and 1 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 * * \section Description * * Start logging on the specified file. Default log level set is logging.ERROR. Though this can be changed with setloglevel LDTP API. * * \section ImplementationDetails * 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. * * \retval 1 on Success and 0 on error * * \section 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 Alagappan */ /** \page stoplog stoplog * \section Syntax * * stoplog() * * \section Description * * Stop logging * * \section ImplementationDetails * 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. * * \section Example * * stoplog() * * \author Nagappan Alagappan */ /** \page imagecapture imagecapture * \section Syntax * * imagecapture([\, [\,(opt)\,(opt)\,(opt)x,(opt)y]]) * * \section Description * * 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. * * \section ImplementationDetails * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtp/generic.py * * Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/generic.py * * Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Screenshot.cs * * \section Example * * from ldtputils import * * * imagecapture('Terminal', 'out.png') # out.jpg will be created in current directory. Give absolute path to save it in some other directory. * * imagecapture() # Captures the complete X screen and saves in a temp file and returns the file name. * * \note Window title name is case sensitive * * \section Dependency * * Import utility of ImageMagick - Linux: http://www.imagemagick.org/script/import.php # Mandatory dependency, if you want to use this function. * * \author Nagashree */ /** \page imagecompare imagecompare * \section Syntax * * imagecompare(imgfile1, imgfile2) * * \section Description * * Compares two images and returns difference of them in percentage. If PIL package is not installed, LdtpExecutionError exception will be thrown. * * \retval difference in percentage on successful image comaprison, else LdtpExecutionError exception * * Note: Script designer can decide the pass / fail criteria based on the diff percentage. * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtputils/__init__.py * * \section Example * * from ldtputils import * * * imagecompare('in.jpg', 'out.jpg') # Assuming that in.jpg and out.jpg are in current directory. File path should be absolute path. * * \section Dependency * * Python Imaging Library - Linux: http://www.pythonware.com/products/pil/ * * \note Supported only on Linux * * \author Shankar Ganesh * \author Veerapuram Varadhan */ /** \page blackoutregion blackoutregion * \section Syntax * * blackoutregion(infile, outfile, topx, topy, botx, boty) * * \section Description * * Blacks out the region in the image given by * * top-coords - topx,topy bottom-coords - botx,boty * * of the region * * \section ImplementationDetails * * Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtputils/__init__.py * * \section Example * * blackoutregion('in.jpg','out.jpg',100,100,200,200) * * \section Dependency * * Python Imaging Library - Linux: http://www.pythonware.com/products/pil/ * * \note Supported only on Linux * * \author Shankar Ganesh */ /** \page startprocessmonitor startprocessmonitor * \section Syntax * * startprocessmonitor(\[, \