Welcome, Guest! Log In | Create Account

Changes between Version 1 and Version 2 of WikiStart

Show
Ignore:
Timestamp:
09/24/09 17:12:13 (3 months ago)
Author:
degarrah (IP: 172.29.29.52)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v1 v2  
    1 = Welcome to Trac 0.11.2.1 = 
    2  
    3 Trac is a '''minimalistic''' approach to '''web-based''' management of 
    4 '''software projects'''. Its goal is to simplify effective tracking and handling of software issues, enhancements and overall progress. 
    5  
    6 All aspects of Trac have been designed with the single goal to  
    7 '''help developers write great software''' while '''staying out of the way''' 
    8 and imposing as little as possible on a team's established process and 
    9 culture. 
    10  
    11 As all Wiki pages, this page is editable, this means that you can 
    12 modify the contents of this page simply by using your 
    13 web-browser. Simply click on the "Edit this page" link at the bottom 
    14 of the page. WikiFormatting will give you a detailed description of 
    15 available Wiki formatting commands. 
    16  
    17  
    18 TracGuide is a good place to start. 
    19  
    20 Enjoy! [[BR]] 
    21 ''The Trac Team'' 
    22  
    23 == Starting Points == 
    24  
    25  * TracGuide --  Built-in Documentation 
    26  * [http://trac.edgewall.org/ The Trac project] -- Trac Open Source Project 
    27  * [http://trac.edgewall.org/wiki/TracFaq Trac FAQ] -- Frequently Asked Questions 
    28  * TracSupport --  Trac Support 
    29  
    30 For a complete list of local wiki pages, see TitleIndex. 
     1[[PageOutline]] 
     2= Zephyr = 
     3 
     4[[br]][[br]] 
     5 
     6 
     7= Zephyr in a Python Nutshell = 
     8 
     9== Classes Overview == 
     10 
     11 * driver - this class is used to drive keyboard and mouse input. 
     12 * image - provides functions for handling images. screencapture, image comparison. 
     13 * image_search_result - all searches return this result class. it contains the result status, location, timings etc 
     14 * input - key, mouse definition class. this is going to be refactored out into seperate keyboard/mouse classes. 
     15 * stopwatch - helper clear for measuring time 
     16 * utils - various utility functions 
     17 
     18 * robot - this class uses to the above classes as building blocks to wrap some common automation functionality.  
     19    
     20 
     21 
     22=== driver === 
     23 * bool = isInitialized() 
     24 
     25 * point = getMousePosition() 
     26 * mouseClick(button, x, y) 
     27 * mouseDoubleClick(button, x, y) 
     28 * mouseDown(button, x, y) 
     29 * mouseMove(button, x, y) 
     30 * mouseUp(button, x, y) 
     31 * mouseWheel(delta) 
     32 
     33 * keyDown(key) 
     34 * keyPress(key) 
     35 * keyUp(key) 
     36 
     37 * sendText(text) 
     38     
     39 
     40=== image === 
     41 
     42 * image_search_result = findImage(image) 
     43 * image_search_result = findImage(image, x, y, tolerance=0) 
     44 * int = getDepth(self) 
     45 * int = getHeight(self) 
     46 * int = getWidth(self) 
     47 * bool = loadImage(filename) 
     48 * bool = saveImage(filename, quality=100) 
     49 * bool = takeScreenshot(display=0) 
     50 * bool = takeScreenshot(x, y, width, height, display=0) 
     51     
     52 
     53=== image_search_result === 
     54 
     55 * bool found - was image found? True/False 
     56 * int searchTime - how long it took to find image in milliseconds 
     57 * int height - width of image 
     58 * int width - width of image 
     59 * int x - x location on screen where image was found 
     60 * int y - y location on screen where image was found 
     61     
     62 
     63=== input === 
     64 
     65 * Mouse Buttons: 
     66  * NO_BUTTON = 0 
     67  * RIGHT_BUTTON = 2 
     68  * LEFT_BUTTON = 1 
     69  * MIDDLE_BUTTON = 3 
     70 
     71 * Keycodes: 
     72  * KEY_ADD = 40 
     73  * KEY_APPS = 28 
     74  * KEY_BACKSPACE = 1 
     75  * KEY_CAPSLOCK = 9 
     76  * KEY_CLEAR = 3 
     77  * KEY_CONTROL = 6 
     78  * KEY_DECIMAL = 43 
     79  * KEY_DELETE = 24 
     80  * KEY_DIVIDE = 44 
     81  * KEY_DOWN = 19 
     82  * KEY_END = 14 
     83  * KEY_ESCAPE = 10 
     84  * KEY_EXECUTE = 21 
     85  * KEY_F1 = 45 
     86  * KEY_F10 = 54 
     87  * KEY_F11 = 55 
     88  * KEY_F12 = 56 
     89  * KEY_F13 = 57 
     90  * KEY_F14 = 58 
     91  * KEY_F15 = 59 
     92  * KEY_F16 = 60 
     93  * KEY_F17 = 61 
     94  * KEY_F18 = 62 
     95  * KEY_F19 = 63 
     96  * KEY_F2 = 46 
     97  * KEY_F20 = 64 
     98  * KEY_F21 = 65 
     99  * KEY_F22 = 66 
     100  * KEY_F3 = 47 
     101  * KEY_F4 = 48 
     102  * KEY_F5 = 49 
     103  * KEY_F6 = 50 
     104  * KEY_F7 = 51 
     105  * KEY_F8 = 52 
     106  * KEY_F9 = 53 
     107  * KEY_HELP = 25 
     108  * KEY_HOME = 15 
     109  * KEY_INSERT = 23 
     110  * KEY_LCONTROL = 71 
     111  * KEY_LEFT = 16 
     112  * KEY_LMENU = 73 
     113  * KEY_LSHIFT = 69 
     114  * KEY_LWIN = 26 
     115  * KEY_MENU = 7 
     116  * KEY_MULTIPLY = 39 
     117  * KEY_NUMLOCK = 67 
     118  * KEY_NUMPAD0 = 29 
     119  * KEY_NUMPAD1 = 30 
     120  * KEY_NUMPAD2 = 31 
     121  * KEY_NUMPAD3 = 32 
     122  * KEY_NUMPAD4 = 33 
     123  * KEY_NUMPAD5 = 34 
     124  * KEY_NUMPAD6 = 35 
     125  * KEY_NUMPAD7 = 36 
     126  * KEY_NUMPAD8 = 37 
     127  * KEY_NUMPAD9 = 38 
     128  * KEY_PAGEDOWN = 13 
     129  * KEY_PAGEUP = 12 
     130  * KEY_PAUSE = 8 
     131  * KEY_PRINTSCREEN = 22 
     132  * KEY_RCONTROL = 72 
     133  * KEY_RETURN = 4 
     134  * KEY_RIGHT = 18 
     135  * KEY_RMENU = 74 
     136  * KEY_RSHIFT = 70 
     137  * KEY_RWIN = 27 
     138  * KEY_SCROLL = 68 
     139  * KEY_SELECT = 20 
     140  * KEY_SEPARATOR = 41 
     141  * KEY_SHIFT = 5 
     142  * KEY_SPACE = 11 
     143  * KEY_SUBTRACT = 42 
     144  * KEY_TAB = 2 
     145  * KEY_UP = 17 
     146     
     147 
     148 
     149 
     150=== robot === 
     151 
     152 * robot(imageDirectory) - specify path to images. any image functions are expected to be relative to this directory 
     153   
     154 * disableExceptions(self) - Disable exceptions when searching for images. Useful if have an if/else test 
     155 * enableExceptions(self) - Enable exceptions when searching for images. Useful if have an if/else test 
     156 * bool = getDisableExceptions(self) - Are exceptions disabled or not 
     157 * setTimeout(seconds=30) - Set the default timeout in seconds for image searches 
     158 
     159 * findImage(imagename, x=0, y=0) - searchs for image from top left to bottom right. You can specify a starting x,y. 
     160 * findAndClick(imagename, x=0, y=0, button=LEFT_BUTTON, relativeX=0, relativeY=0) - Search for image and click on it. You can specify a start x/y location, what button to click. You can also speficy a relative location to click.  
     161 * string = getImageFilename(imagename) - gets full pathname to relative imagename 
     162 * saveScreenshot(imagename, waitMilliseconds=0, x=-1, y=-1,width=-1,height=-1) - Saves screenshot to imagename. You can specify how long to wait before taking screenshot, x, y width and height of screenshot. 
     163 
     164 * mouseClick(button, x, y) 
     165 * mouseDoubleClick(button, x, y) 
     166 * mouseDown(button, x, y) 
     167 * mouseMove(button, x, y) 
     168 * mouseUp(button, x, y) 
     169 * mouseWheel(delta) 
     170 
     171 * keyDown(key) 
     172 * keyPress(key) 
     173 * keyUp(key) 
     174 
     175 * sendText(text) 
     176  
     177 * getScreenDepth(self) 
     178 * getScreenHeight(self) 
     179 * getScreenWidth(self) 
     180 
     181 
     182 * string = getVersion() - Returns the version of Zephyr 
     183 
     184 
     185 
     186 
     187     
     188=== stopwatch === 
     189 
     190 * long = elapsed() - elapsed time in milliseconds 
     191 * pause() - pause the timer 
     192 * resume() - resume the timer 
     193 * start() - start the time     
     194 
     195=== utils === 
     196 * File System: 
     197  * bool = dirExists(filename) 
     198  * bool = makeDir(filename) 
     199  * bool = removeDir(filename) 
     200  * bool = removeFile(filename) 
     201  * bool = fileExists(filename) 
     202  * long = execute(filename, waitToFinish=True) 
     203 
     204 
     205 * Time/Date: 
     206  * string = getDateTime() - gets friendly date/time 
     207  * long = getEpoch() - returns current epoch  
     208 
     209 * System info: 
     210  * string = getHostname() 
     211  * string = getOsDescription() 
     212  * string = getOsVersion() 
     213  * string = getUserHome() 
     214  * string = getUsername() 
     215 
     216 * General: 
     217  * sleep(milliseconds) - sleep for n milliseconds 
     218  * string = getVersion() - Returns the version of Zephyr